Tip: Right-click on an empty area of a Command Window to display links to AutoHotkey online documentation and related contents.
No. AHK scripts are too complex to be parsed and the conversion would never be perfect. You can, however, include the original PMC code into the exported scripts by checking this option in the Export Window.
Use the Random command in the Run / File / String / Misc. window to generate a random number. The command will save the number inside a variable of your choice. Use this variable inside commands like Sleep enclosed in percent signs, e.g. %Rand% and directly inside functions and expressions, e.g. MyArray[Rand].
Download Example: Call array element using a random function
No, creating Guis is not in the scope of this project. But you can find some nice tools to design Gui in the AHK forum. You can use the generated script along with exported scripts from PMC (the Gui's gLabel must point to a Label in the script).
No. Macro Creator can connect to IE because its controls are exposed via COM, but that type of interaction is not possible with other browsers in the same way. Control Commands won't work either, so you might have more luck with mouse, keystrokes and Image Search.
It's located at %AppData%\MacroCreator\~ActiveProject.pmc
or at the application's own folder in case it's running as portable (when MacroCreator.ini
is in the same folder as MacroCreator.exe
).
You can use the Speed Up and Slow Down keys (defaults are Insert and Pause at 2x). To change the keys and speed multiplier see Playback Options.
Follow these steps to execute an action for Pixel/Image search based on a condition:
Yes, use the Timer or the SetTimer command.
If the window is a Win32 application with exposed controls you might be able to use Control commands to interact with it without needing to have it active in the foreground. For more info check the video tutorial for control commands.
You can use Window's Task Scheduler to run Macro Creator from a command line using the AutoPlay parameter:
MacroCreator.exe SavedFile.pmc -a
You can also export the Macro to an AutoHotkey script and run it using Window's Task Scheduler (you must have AutoHotkey installed).
You can use the Variables window and the += operator o the := operator and the Expression option if you need to sum it to another value like the built-in variable A_Index, which contains the number of the current loop iteration.
The code below is a PMC file (you can copy and save it using any text editor).
[PMC Code v5.0.0]|F3||1|Window,2,Fast,0,1|1|Macro1 Groups= 1|[Assign Variable]|Var := 0|1|0|Variable||||| 2|[LoopStart]|LoopStart|10|0|Loop||||| 3|[Assign Variable]|Var += 1|1|0|Variable||||| 4|[MsgBox]|%Var%|1|0|MsgBox|262208|||| 5|[LoopEnd]|LoopEnd|1|0|Loop||||| 6|[LoopStart]|LoopStart|10|0|Loop||||| 7|[Assign Variable]|Var := 100 + A_Index|1|0|Variable|Expression|||| 8|[MsgBox]|%Var%|1|0|MsgBox|262208|||| 9|[LoopEnd]|LoopEnd|1|0|Loop|||||
A_Index is only valid inside a Loop, but in PMC all macros are considered loops since you can set the number of repetitions for the whole macro.
To make the first macro auto-execute when running an exported script, remove the hotkey associated with it in the Export Window "Macros" section.
All settings are saved to MacroCreator.ini and User Global Variables are saved to UserGlobalVars.ini, both files are located inside AppData\MacroCreator by default. To make Macro Creator portable you can copy those files to the same directory of MacroCreator.exe and it will use its own folder instead of AppData.
It's possible using the Timer and some If Statements.
Although the Timer is limited to run one Macro at a time, you can still activate the other Hotkeys by checking the Always Active option or right-clicking the TrayMenu icon and selecting Play. The SetTimer command is more flexible.
Macro Creator has an option to convert exported scripts to EXE using Ahk2Exe that is installed with AutoHotkey:
1. Download and install AutoHotkey.
2. Go to Export in PMC and check Create EXE File option.
3. Click the Export button.
The EXE file will be saved to the same directory as the script file.
To bypass error messages go to Options > Settings > Playback and check the "Do not display errors" option.
There are two methods:
COM stands for Component Object Model and it's a method to allow interaction of a script with other programs. The Internet Explorer command window offers a basic simplified interface to add COM commands to IE. If you want to use the advanced features you'll need to know about the COM methods and properties for the program you want to interact with. You can find some useful tutorials in the AutoHotkey Forum.
Macro Creator has the GDI+ Library integrated so you can make use of its functions.
The example file below allows you to save a png from the clipboard in your Documents folder. The first macro sends PrintScreen, the second sends Alt+PrintScreen, the third are the functions to save the file (you can change the destination folder in the 3rd line).
Download Example: Save PNG screenshots
There is also an an internal function that uses GDI+ functions to make a screenshot of part of the screen.
Example of PMC file:
1|Screenshot|_null := A_MyDocuments "\Screen_" A_Now ".png", "100¢200¢50¢100"|1|0|Function||||
The ¢ symbol replaces the | in .pmc files and is converted when loaded.
The visible area of a window can be affected by your current Theme, but you can adjust the selection to fit the correct area:
Yes. To activate recording Key down/up for all keys go to Options > Recording.
Go to Settings > Playback and make sure that the option Return Mouse to initial position after playback is unchecked.
Yes, just check the Always Active option in the main window.
Your script must use the Send command with a higher level to execute the Hotkeys in PMC. Put these two lines on top of it.
#InputLevel, 1 SendLevel, 1
\#InputLevel makes it possible to use Send command from a hotkey in another script and SendLevel allows to use Send command from a subroutine such as a gLabel.
Yes. You can load an external .ahk file in the Functions command window to run functions from it and save the results to the Output Variable. You can set a Standard Library File containing your functions in Settings > Misc., this file will be automatically selected when you enter the Function command window.
This feature is limited and can only return 1 string/number value. It's recommended to use User-Defined Functions instead.
Yes, use the Context Sensitive Hotkeys button in the main window.
The default settings for mouse coords are relative to the active window to make clicks point correctly even when the window is in a different position of when Macro was created. When working with multiple windows it may be best to adjust or maximize all windows and change CoordMode to screen (Settings > Defaults).
Jn some systems Macro Creator requires administrator privileges in order to work properly. Enter the program or shortcut's Properties, select the Compatibility tab (click the Advanced button, if it's a shortcut) and check the "Run as administrator" option.
This is a keyboard language issue. Change the default keyboard layout of your system (global settings) to English and open MacroCreator.