Sign in to follow this  
Followers 0
RamPalav

Send text to VBA form

10 posts in this topic

#1 ·  Posted (edited)

Hi,

I want to send text into a VBA form's text field. Can someone please guide me on the autoit script that can help me.

Below is the sample code that I need help on:

#include <Excel.au3>
#include <FileConstants.au3>
#include <MsgBoxConstants.au3>


@ScriptDir ="D:\\AutoIT\"
$sFilePath = @ScriptDir & "\ExcelForm.xlsm"

Local $oAppl = _Excel_Open()
;Local $oAppl = _Excel_Open(False, Default, Default, Default, True)
Local $sWorkbook = $sFilePath
Local $oWorkbook = _Excel_BookOpen($oAppl, $sWorkbook)

ConsoleWrite('before opening macro.........1')
$oAppl.Run('mymacro')

Sleep(3000)
ConsoleWrite('After opening macro.........1')

Send('First text')
ConsoleWrite('After opening macro.........2')
Send('{TAB}')
ConsoleWrite('After opening macro.........3')
Send('Second text')
ConsoleWrite('After opening macro.........4')
Send('{TAB}')
Send('{Enter}')
ConsoleWrite('After opening macro.........5')

thanks,

 

Edited by Melba23
Added code tags

Share this post


Link to post
Share on other sites

RamPalav,

Please pay attention to where you post - the "Developer General Discussion" section where you started this thread is not for general support questions.  I have moved it for you, but would ask you to be more careful in future.

And when you post code please use Code tags - see here how to do it.  Then you get a scrolling box and syntax colouring as you can see above now I have added the tags.

M23

 

 


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Hi junkew,

 

I refered number 31,

but here my macro is not processing further. So after running macro, it openup macro, but didnot move ahead with send/sendcontrol or tabs.

do i have to do any settings in excel macro?

Share this post


Link to post
Share on other sites

@RamPalav,

On 5/17/2016 at 7:20 PM, RamPalav said:
@ScriptDir ="D:\\AutoIT\"

 

first, you do not assign a value to an internal AutoIt macro. it is populated automatically. remove that line.

now, what you do is this: read the tutorial "Simple Notepad Automation" (in the help file, AutoIt \ Tutorials). this tutorial explains:

1) how to wait for the form to appear, instead of using Sleep().

2) how to use the AutoIt Windows Info tool to analyze the VBA form and find the controls you need to manipulate.

once you know what the controls are called, you can substitute you Send() calls with ControlSend(), which eliminate the need for tabbing and in general makes your script more robust.

 

now for a different aspect. VBA is used to automate Excel, and you wish to use AutoIt to automate the VBA. are you seeing something odd here? how about a change of approach - make your VBA code, before calling the form, get the text to fill (from wherever AutoIt takes it) and populate the form - and perhaps you can skip the form step altogether.

Share this post


Link to post
Share on other sites

The VBA files (Containing series of multiple forms) which i  get is protected and not able to edit those. So I need to send the data to it along with button click to get the result and end of last form.

The issue was I was able to run macro but it was not able to pass the data to text boxes, combo box, buttons etc.

I found a work way around creating a new exe through C# and calling them through AutoIT. May be it is not the correct way!!

Thanks for your support!

 

 

Share this post


Link to post
Share on other sites

Finally,

do not call the macro, create a button on excel and assign macro to it and click that button with mouse click

and done.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • HankHell
      By HankHell
      I know this is a common thing people seem to ask for on the forums. And I was bored so I made this for those that wish to make their own macros on the fly.
      #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: HankHell Script Function: Simple Macro Maker #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here ; add Mouse Scroll Wheel [+1] every scroll up, every scroll down, reset key to break rotation #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <AutoItConstants.au3> #include <Misc.au3> Global $Form1 Global $CoordFinderButton1 Global $CoordFinderButton2 Global $CoordFinderButton3 Global $CoordFinderButton4 Global $Create Global $State = 1 ;--------------------- Global $GetStartStop Global $GetStartStopNew = "{F1}" ;F1 to toggle the macro on/off Global $GUIOpen Global $GUIOpenNew = "{HOME}" ;HOME opens the GUI back up Global $GetEnd Global $End_Program_New = "{END}" ;END (near Home, PageUp) to close the program ;--------------------- Global $LeftClickA = "" Global $LeftClickB = "" Global $LeftClickC = "" Global $LeftClickD = "" Global $RightClickA = "" Global $RightClickB = "" Global $RightClickC = "" Global $RightClickD = "" ;--------------------- Global $PressKeyA = "" Global $PressKeyB = "" Global $PressKeyC = "" Global $PressKeyD = "" ;--------------------- Global $KeysToSendA = "" Global $KeysToSendB = "" Global $KeysToSendC = "" Global $KeysToSendD = "" Global $SendKeysToSendA = "" Global $SendKeysToSendB = "" Global $SendKeysToSendC = "" Global $SendKeysToSendD = "" ;--------------------- Global $SleepTimeA = "" Global $SleepTimeB = "" Global $SleepTimeC = "" Global $SleepTimeD = "" Global $SleepySleepTimeA = 0 Global $SleepySleepTimeB = 0 Global $SleepySleepTimeC = 0 Global $SleepySleepTimeD = 0 ;--------------------- Global $LogKeysToSendA Global $LogKeysToSendB Global $LogKeysToSendC Global $LogKeysToSendD ;--------------------- Global $LogSleepTimeA Global $LogSleepTimeB Global $LogSleepTimeC Global $LogSleepTimeD ;--------------------- Global $LeftClickCheckA Global $LeftClickCheckB Global $LeftClickCheckC Global $LeftClickCheckD Global $RightClickCheckA Global $RightClickCheckB Global $RightClickCheckC Global $RightClickCheckD ;--------------------- Global $Hotkeys = 0 Global $ToggleButton Global $GUIButton Global $GetEndButton Global $LogGetStartStop Global $LogGUIOpen Global $LogGetEnd ;--------------------- Global $X_Y_Send1 = "" Global $X_Y_Send2 = "" Global $X_Y_Send3 = "" Global $X_Y_Send4 = "" Global $L1X = "" Global $L1Y = "" Global $L2X = "" Global $L2Y = "" Global $L3X = "" Global $L3Y = "" Global $L4X = "" Global $L4Y = "" Global $L1_X = "" Global $L1_Y = "" Global $L2_X = "" Global $L2_Y = "" Global $L3_X = "" Global $L3_Y = "" Global $L4_X = "" Global $L4_Y = "" Global $LogL1X = "" Global $LogL1Y = "" Global $LogL2X = "" Global $LogL2Y = "" Global $LogL3X = "" Global $LogL3Y = "" Global $LogL4X = "" Global $LogL4Y = "" Global $Replace1 Global $Replace2 Global $Replace3 Global $Replace4 Global $Replace5 Global $Replace6 Global $Replace7 Global $Replace8 Global $Replace9 Global $Replace10 Global $With1 Global $With2 Global $With3 Global $With4 Global $With5 Global $With6 Global $With7 Global $With8 Global $With9 Global $With10 Global $GetWith1 Global $GetWith2 Global $GetWith3 Global $GetWith4 Global $GetWith5 Global $GetWith6 Global $GetWith7 Global $GetWith8 Global $GetWith9 Global $GetWith10 Global $LogReplace1 Global $LogReplace2 Global $LogReplace3 Global $LogReplace4 Global $LogReplace5 Global $LogReplace6 Global $LogReplace7 Global $LogReplace8 Global $LogReplace9 Global $LogReplace10 Global $LogWith1 Global $LogWith2 Global $LogWith3 Global $LogWith4 Global $LogWith5 Global $LogWith6 Global $LogWith7 Global $LogWith8 Global $LogWith9 Global $LogWith10 Global $ReplaceWithCLEAR1 Global $ReplaceWithCLEAR2 Global $ReplaceWithCLEAR3 Global $ReplaceWithCLEAR4 Global $ReplaceWithCLEAR5 Global $ReplaceWithCLEAR6 Global $ReplaceWithCLEAR7 Global $ReplaceWithCLEAR8 Global $ReplaceWithCLEAR9 Global $ReplaceWithCLEAR10 Global $GetReplace1 Global $GetReplace2 Global $GetReplace3 Global $GetReplace4 Global $GetReplace5 Global $GetReplace6 Global $GetReplace7 Global $GetReplace8 Global $GetReplace9 Global $GetReplace10 Global $Xposition Global $Yposition Global $FindCoords = 0 MacroMakerGUI() Func MacroMakerGUI() $Form1 = GUICreate("MacroMaker", 410, 688, 198, 124);MAIN WINDOW GUICtrlCreateGroup("Change_Hotkeys", 0, 5, 185, 97) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateLabel("Start_Stop", 8, 25, 68, 17) $GetStartStop = GUICtrlCreateInput("", 80, 25, 95, 21) GUICtrlSetData($GetStartStop, "{F1}") GUICtrlCreateLabel("Open_GUI", 8, 46, 68, 17) $GUIOpen = GUICtrlCreateInput("", 80, 46, 95, 21) GUICtrlSetData($GUIOpen, "{HOME}") GUICtrlCreateLabel("End_Program", 8, 67, 68, 17) $GetEnd = GUICtrlCreateInput("", 80, 67, 95, 21) GUICtrlSetData($GetEnd, "{END}") GUICtrlCreateGroup("Create_Macro", 0, 105, 185, 580) GUICtrlCreateGroup("", -99, -90, 1, 1) GUICtrlCreateLabel("X=", 5, 128, 17, 17) $L1X = GUICtrlCreateInput("", 23, 128, 40, 21) GUICtrlCreateLabel("Y=", 69, 128, 17, 17) $L1Y = GUICtrlCreateInput("", 87, 128, 40, 21) $LeftClickA = GUICtrlCreateCheckbox("Leftclick", 5, 152, 73, 17) $RightClickA = GUICtrlCreateCheckbox("Rightclick", 5, 176, 73, 17) GUICtrlCreateLabel("Press", 5, 200, 30, 17) $KeysToSendA = GUICtrlCreateInput("", 35, 200, 100, 21) GUICtrlCreateLabel("Delay", 5, 221, 30, 17) $SleepTimeA = GUICtrlCreateInput("", 35, 221, 65, 21) GUICtrlCreateLabel("ms", 105, 221, 17, 17) $CoordFinderButton1 = GUICtrlCreateButton("Get" & @CRLF & "Coords", 141, 111, 45, 30, $BS_MULTILINE);COORD FINDER GUICtrlCreateLabel("X=", 5, 255, 17, 17) GUICtrlCreateLabel("Y=", 69, 255, 17, 17) $L2X = GUICtrlCreateInput("", 23, 255, 40, 21) $L2Y = GUICtrlCreateInput("", 87, 255, 40, 21) $LeftClickB = GUICtrlCreateCheckbox("Leftclick", 5, 280, 73, 17) $RightClickB = GUICtrlCreateCheckbox("Rightclick", 5, 304, 73, 17) GUICtrlCreateLabel("Press", 5, 328, 30, 17) $KeysToSendB = GUICtrlCreateInput("", 35, 328, 100, 21) GUICtrlCreateLabel("Delay", 5, 349, 30, 17) $SleepTimeB = GUICtrlCreateInput("", 35, 349, 65, 21) GUICtrlCreateLabel("ms", 105, 349, 17, 17) $CoordFinderButton2 = GUICtrlCreateButton("Get" & @CRLF & "Coords", 141, 237, 45, 30, $BS_MULTILINE);COORD FINDER GUICtrlCreateLabel("X=", 5, 382, 17, 17) GUICtrlCreateLabel("Y=", 69, 382, 17, 17) $L3X = GUICtrlCreateInput("", 23, 382, 40, 21) $L3Y = GUICtrlCreateInput("", 87, 382, 40, 21) $LeftClickC = GUICtrlCreateCheckbox("Leftclick", 5, 408, 73, 17) $RightClickC = GUICtrlCreateCheckbox("Rightclick", 5, 432, 73, 17) GUICtrlCreateLabel("Press", 5, 455, 30, 17) $KeysToSendC = GUICtrlCreateInput("", 35, 455, 100, 21) GUICtrlCreateLabel("Delay", 5, 476, 30, 17) $SleepTimeC = GUICtrlCreateInput("", 35, 476, 65, 21) GUICtrlCreateLabel("ms", 105, 476, 17, 17) $CoordFinderButton3 = GUICtrlCreateButton("Get" & @CRLF & "Coords", 141, 364, 45, 30, $BS_MULTILINE);COORD FINDER GUICtrlCreateLabel("X=", 5, 509, 17, 17) GUICtrlCreateLabel("Y=", 69, 509, 17, 17) $L4X = GUICtrlCreateInput("", 23, 509, 40, 21) $L4Y = GUICtrlCreateInput("", 87, 509, 40, 21) $LeftClickD = GUICtrlCreateCheckbox("Leftclick", 5, 537, 73, 17) $RightClickD = GUICtrlCreateCheckbox("Rightclick", 5, 561, 73, 17) GUICtrlCreateLabel("Press", 5, 585, 30, 17) $KeysToSendD = GUICtrlCreateInput("", 35, 585, 100, 21) GUICtrlCreateLabel("Delay", 5, 606, 30, 17) $SleepTimeD = GUICtrlCreateInput("", 35, 606, 65, 21) GUICtrlCreateLabel("ms", 105, 606, 17, 17) $CoordFinderButton4 = GUICtrlCreateButton("Get" & @CRLF & "Coords", 141, 490, 45, 30, $BS_MULTILINE);COORD FINDER $Create = GUICtrlCreateButton("Create", 48, 650, 75, 25) $Group1 = GUICtrlCreateGroup("Reassign_Keys", 200, 392, 220, 293) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateLabel("Replace", 216, 417, 44, 17) $Replace1 = GUICtrlCreateInput("", 264, 417, 42, 21) GUICtrlCreateLabel("with", 312, 417, 23, 17) $With1 = GUICtrlCreateInput("", 338, 417, 42, 21) $ReplaceWithCLEAR1 = GUICtrlCreateButton("-", 385, 417, 15, 15) GUICtrlCreateLabel("Replace", 216, 438, 44, 17) $Replace2 = GUICtrlCreateInput("", 264, 438, 42, 21) GUICtrlCreateLabel("with", 312, 438, 23, 17) $With2 = GUICtrlCreateInput("", 338, 438, 42, 21) $ReplaceWithCLEAR2 = GUICtrlCreateButton("-", 385, 438, 15, 15);------ GUICtrlCreateLabel("Replace", 216, 459, 44, 17) $Replace3 = GUICtrlCreateInput("", 264, 459, 42, 21) GUICtrlCreateLabel("with", 312, 459, 23, 17) $With3 = GUICtrlCreateInput("", 338, 459, 42, 21) $ReplaceWithCLEAR3 = GUICtrlCreateButton("-", 385, 459, 15, 15);------ GUICtrlCreateLabel("Replace", 216, 480, 44, 17) $Replace4 = GUICtrlCreateInput("", 264, 480, 42, 21) GUICtrlCreateLabel("with", 312, 480, 23, 17) $With4 = GUICtrlCreateInput("", 338, 480, 42, 21) $ReplaceWithCLEAR4 = GUICtrlCreateButton("-", 385, 480, 15, 15);------ GUICtrlCreateLabel("Replace", 216, 501, 44, 17) $Replace5 = GUICtrlCreateInput("", 264, 501, 42, 21) GUICtrlCreateLabel("with", 312, 501, 23, 17) $With5 = GUICtrlCreateInput("", 338, 501, 42, 21) $ReplaceWithCLEAR5 = GUICtrlCreateButton("-", 385, 501, 15, 15);------ GUICtrlCreateLabel("Replace", 216, 522, 44, 17) $Replace6 = GUICtrlCreateInput("", 264, 522, 42, 21) GUICtrlCreateLabel("with", 312, 522, 23, 17) $With6 = GUICtrlCreateInput("", 338, 522, 42, 21) $ReplaceWithCLEAR6 = GUICtrlCreateButton("-", 385, 522, 15, 15);------ GUICtrlCreateLabel("Replace", 216, 543, 44, 17) $Replace7 = GUICtrlCreateInput("", 264, 543, 42, 21) GUICtrlCreateLabel("with", 312, 543, 23, 17) $With7 = GUICtrlCreateInput("", 338, 543, 42, 21) $ReplaceWithCLEAR7 = GUICtrlCreateButton("-", 385, 543, 15, 15);------ GUICtrlCreateLabel("Replace", 216, 564, 44, 17) $Replace8 = GUICtrlCreateInput("", 264, 564, 42, 21) GUICtrlCreateLabel("with", 312, 564, 23, 17) $With8 = GUICtrlCreateInput("", 338, 564, 42, 21) $ReplaceWithCLEAR8 = GUICtrlCreateButton("-", 385, 564, 15, 15);------ GUICtrlCreateLabel("Replace", 216, 585, 44, 17) $Replace9 = GUICtrlCreateInput("", 264, 585, 42, 21) GUICtrlCreateLabel("with", 312, 585, 23, 17) $With9 = GUICtrlCreateInput("", 338, 585, 42, 21) $ReplaceWithCLEAR9 = GUICtrlCreateButton("-", 385, 585, 15, 15);------ GUICtrlCreateLabel("Replace", 216, 606, 44, 17) $Replace10 = GUICtrlCreateInput("", 264, 606, 42, 21) GUICtrlCreateLabel("with", 312, 606, 23, 17) $With10 = GUICtrlCreateInput("", 338, 606, 42, 21) $ReplaceWithCLEAR10 = GUICtrlCreateButton("-", 385, 606, 15, 15);------ $ReplaceWithCLEARALL = GUICtrlCreateButton("Clear All", 350, 645, 50, 15) $HideMainGUI = GUICtrlCreateButton("Hide GUI", 350, 660, 50, 15) $ReplaceKeys = GUICtrlCreateButton("Replace Keys", 260, 650, 75, 25) LogKeys() GUISetState(@SW_SHOW, $Form1) While $State = 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GetStartStop $GetStartStopNew = ControlGetText("", "", $GetStartStop) $LogGetStartStop = ControlGetText("", "", $GetStartStop);LOG $ToggleButton = 1 Case $GUIOpen $GUIOpenNew = ControlGetText("", "", $GUIOpen) $LogGUIOpen = ControlGetText("", "", $GUIOpen);LOG $GUIButton = 1 Case $GetEnd $End_Program_New = ControlGetText("", "", $GetEnd) $LogGetEnd = ControlGetText("", "", $GetEnd);LOG $GetEndButton = 1 ;----------------------------------------------------------- Case $LeftClickA If GUICtrlRead($LeftClickA) = $GUI_CHECKED Then $LeftClickCheckA = 1 EndIf If GUICtrlRead($LeftClickA) = $GUI_UNCHECKED Then $LeftClickCheckA = 0 EndIf Case $LeftClickB If GUICtrlRead($LeftClickB) = $GUI_CHECKED Then $LeftClickCheckB = 1 EndIf If GUICtrlRead($LeftClickB) = $GUI_UNCHECKED Then $LeftClickCheckB = 0 EndIf Case $LeftClickC If GUICtrlRead($LeftClickC) = $GUI_CHECKED Then $LeftClickCheckC = 1 EndIf If GUICtrlRead($LeftClickC) = $GUI_UNCHECKED Then $LeftClickCheckC = 0 EndIf Case $LeftClickD If GUICtrlRead($LeftClickD) = $GUI_CHECKED Then $LeftClickCheckD = 1 EndIf If GUICtrlRead($LeftClickD) = $GUI_UNCHECKED Then $LeftClickCheckD = 0 EndIf ;----------------------------------------------------------- Case $RightClickA If GUICtrlRead($RightClickA) = $GUI_CHECKED Then $RightClickCheckA = 1 EndIf If GUICtrlRead($RightClickA) = $GUI_UNCHECKED Then $RightClickCheckA = 0 EndIf Case $RightClickB If GUICtrlRead($RightClickB) = $GUI_CHECKED Then $RightClickCheckB = 1 EndIf If GUICtrlRead($RightClickB) = $GUI_UNCHECKED Then $RightClickCheckB = 0 EndIf Case $RightClickC If GUICtrlRead($RightClickC) = $GUI_CHECKED Then $RightClickCheckC = 1 EndIf If GUICtrlRead($RightClickC) = $GUI_UNCHECKED Then $RightClickCheckC = 0 EndIf Case $RightClickD If GUICtrlRead($RightClickD) = $GUI_CHECKED Then $RightClickCheckD = 1 EndIf If GUICtrlRead($RightClickD) = $GUI_UNCHECKED Then $RightClickCheckD = 0 EndIf ;----------------------------------------------------------- Case $KeysToSendA $PressKeyA = 1 $SendKeysToSendA = ControlGetText("", "", $KeysToSendA) $LogKeysToSendA = ControlGetText("", "", $KeysToSendA);LOG Case $KeysToSendB $PressKeyB = 1 $SendKeysToSendB = ControlGetText("", "", $KeysToSendB) $LogKeysToSendB = ControlGetText("", "", $KeysToSendB);LOG Case $KeysToSendC $PressKeyC = 1 $SendKeysToSendC = ControlGetText("", "", $KeysToSendC) $LogKeysToSendC = ControlGetText("", "", $KeysToSendC);LOG Case $KeysToSendD $PressKeyD = 1 $SendKeysToSendD = ControlGetText("", "", $KeysToSendD) $LogKeysToSendD = ControlGetText("", "", $KeysToSendD);LOG ;----------------------------------------------------------- Case $SleepTimeA $SleepySleepTimeA = ControlGetText("", "", $SleepTimeA) $LogSleepTimeA = ControlGetText("", "", $SleepTimeA);LOG Case $SleepTimeB $SleepySleepTimeB = ControlGetText("", "", $SleepTimeB) $LogSleepTimeB = ControlGetText("", "", $SleepTimeB);LOG Case $SleepTimeC $SleepySleepTimeC = ControlGetText("", "", $SleepTimeC) $LogSleepTimeC = ControlGetText("", "", $SleepTimeC);LOG Case $SleepTimeD $SleepySleepTimeD = ControlGetText("", "", $SleepTimeD) $LogSleepTimeD = ControlGetText("", "", $SleepTimeD);LOG ;----------------------------------------------------------- Case $Create Sleep(100) GUISetState(@SW_HIDE, $Form1) Macro() Case $CoordFinderButton1 $X_Y_Send1 = 1 $FindCoords = 1 CoordFinder() Case $CoordFinderButton2 $X_Y_Send2 = 1 $FindCoords = 2 CoordFinder() Case $CoordFinderButton3 $X_Y_Send3 = 1 $FindCoords = 3 CoordFinder() Case $CoordFinderButton4 $X_Y_Send4 = 1 $FindCoords = 4 CoordFinder() Case $ReplaceKeys ReplaceKeys() ReassignKeysNotification() ;----------------------------------------------------------- Case $L1X $X_Y_Send1 = 1 $L1_X = ControlGetText("", "", $L1X) $LogL1X = ControlGetText("", "", $L1X);LOG Case $L1Y $X_Y_Send1 = 1 $L1_Y = ControlGetText("", "", $L1Y) $LogL1Y = ControlGetText("", "", $L1Y);LOG Case $L2X $X_Y_Send2 = 1 $L2_X = ControlGetText("", "", $L2X) $LogL2X = ControlGetText("", "", $L2X);LOG Case $L2Y $X_Y_Send2 = 1 $L2_Y = ControlGetText("", "", $L2Y) $LogL2Y = ControlGetText("", "", $L2Y);LOG Case $L3X $X_Y_Send3 = 1 $L3_X = ControlGetText("", "", $L3X) $LogL3X = ControlGetText("", "", $L3X);LOG Case $L3Y $X_Y_Send3 = 1 $L3_Y = ControlGetText("", "", $L3Y) $LogL3Y = ControlGetText("", "", $L3Y);LOG Case $L4X $X_Y_Send4 = 1 $L4_X = ControlGetText("", "", $L4X) $LogL4X = ControlGetText("", "", $L4X);LOG Case $L4Y $X_Y_Send4 = 1 $L4_Y = ControlGetText("", "", $L4Y) $LogL4Y = ControlGetText("", "", $L4Y);LOG ;----------------------------------------------------------- Case $ReplaceWithCLEAR1 ClearKeys1() Case $ReplaceWithCLEAR2 ClearKeys2() Case $ReplaceWithCLEAR3 ClearKeys3() Case $ReplaceWithCLEAR4 ClearKeys4() Case $ReplaceWithCLEAR5 ClearKeys5() Case $ReplaceWithCLEAR6 ClearKeys6() Case $ReplaceWithCLEAR7 ClearKeys7() Case $ReplaceWithCLEAR8 ClearKeys8() Case $ReplaceWithCLEAR9 ClearKeys9() Case $ReplaceWithCLEAR10 ClearKeys10() Case $ReplaceWithCLEARALL ClearKeysALL() Case $HideMainGUI HideMacroMakerGUI() EndSwitch WEnd EndFunc Func Macro() $Hotkeys = 1 Hotkeys() Global $ToggleState Global $Toggle = True If $Toggle = False Then $ToggleState = True Else $ToggleState = False EndIf EndFunc Func Toggle() $ToggleState = NOT $ToggleState While $ToggleState If $LogL1X = "" Then $X_Y_Send1 = 0 EndIf If $LogL1Y = "" Then $X_Y_Send1 = 0 EndIf If $X_Y_Send1 = 1 Then MouseMove($L1_X, $L1_Y, 10) EndIf If $LeftClickCheckA = 1 Then MouseClick($MOUSE_CLICK_PRIMARY) EndIf If $RightClickCheckA = 1 Then MouseClick($MOUSE_CLICK_SECONDARY) EndIf If $PressKeyA = 1 Then Send($SendKeysToSendA) EndIf Sleep($SleepySleepTimeA) ;------------------------------ If $LogL2X = "" Then $X_Y_Send2 = 0 EndIf If $LogL2Y = "" Then $X_Y_Send2 = 0 EndIf If $X_Y_Send2 = 1 Then MouseMove($L2_X, $L2_Y, 10) EndIf If $LeftClickCheckB = 1 Then MouseClick($MOUSE_CLICK_PRIMARY) EndIf If $RightClickCheckB = 1 Then MouseClick($MOUSE_CLICK_SECONDARY) EndIf If $PressKeyB = 1 Then Send($SendKeysToSendB) EndIf Sleep($SleepySleepTimeB) ;------------------------------ If $LogL3X = "" Then $X_Y_Send3 = 0 EndIf If $LogL3Y = "" Then $X_Y_Send3 = 0 EndIf If $X_Y_Send3 = 1 Then MouseMove($L3_X, $L3_Y, 10) EndIf If $LeftClickCheckC = 1 Then MouseClick($MOUSE_CLICK_PRIMARY) EndIf If $RightClickCheckC = 1 Then MouseClick($MOUSE_CLICK_SECONDARY) EndIf If $PressKeyC = 1 Then Send($SendKeysToSendC) EndIf Sleep($SleepySleepTimeC) ;------------------------------ If $LogL4X = "" Then $X_Y_Send4 = 0 EndIf If $LogL4Y = "" Then $X_Y_Send4 = 0 EndIf If $X_Y_Send4 = 1 Then MouseMove($L4_X, $L4_Y, 10) EndIf If $LeftClickCheckD = 1 Then MouseClick($MOUSE_CLICK_PRIMARY) EndIf If $RightClickCheckD = 1 Then MouseClick($MOUSE_CLICK_SECONDARY) EndIf If $PressKeyD = 1 Then Send($SendKeysToSendD) EndIf Sleep($SleepySleepTimeD) ;------------------------------ If Not $ToggleState Then Sleep(100) EndIf WEnd EndFunc Func Hotkeys() If $Hotkeys = 0 Then HotKeySet($GetStartStopNew) HotKeySet($GUIOpenNew) HotKeySet($End_Program_New) EndIf If $Hotkeys = 1 Then HotKeySet($GetStartStopNew, "Toggle") HotKeySet($GUIOpenNew, "OpenGUI") HotKeySet($End_Program_New, "End") EndIf EndFunc Func LogKeys() If $ToggleButton = 1 Then GUICtrlSetData($GetStartStop, $LogGetStartStop) EndIf If $GUIButton = 1 Then GUICtrlSetData($GUIOpen, $LogGUIOpen) EndIf If $GetEndButton = 1 Then GUICtrlSetData($GetEnd, $LogGetEnd) EndIf ;---------------------------------------------------- If $X_Y_Send1 = 1 Then GUICtrlSetData($L1X, $LogL1X) GUICtrlSetData($L1Y, $LogL1Y) EndIf If $X_Y_Send2 = 1 Then GUICtrlSetData($L2X, $LogL2X) GUICtrlSetData($L2Y, $LogL2Y) EndIf If $X_Y_Send3 = 1 Then GUICtrlSetData($L3X, $LogL3X) GUICtrlSetData($L3Y, $LogL3Y) EndIf If $X_Y_Send4 = 1 Then GUICtrlSetData($L4X, $LogL4X) GUICtrlSetData($L4Y, $LogL4Y) EndIf ;---------------------------------------------------- If $LeftClickCheckA = 1 Then GUICtrlSetState($LeftClickA, $GUI_CHECKED) EndIf If $LeftClickCheckA = 0 Then GUICtrlSetState($LeftClickA, $GUI_UNCHECKED) EndIf If $LeftClickCheckB = 1 Then GUICtrlSetState($LeftClickB, $GUI_CHECKED) EndIf If $LeftClickCheckB = 0 Then GUICtrlSetState($LeftClickB, $GUI_UNCHECKED) EndIf If $LeftClickCheckC = 1 Then GUICtrlSetState($LeftClickC, $GUI_CHECKED) EndIf If $LeftClickCheckC = 0 Then GUICtrlSetState($LeftClickC, $GUI_UNCHECKED) EndIf If $LeftClickCheckD = 1 Then GUICtrlSetState($LeftClickD, $GUI_CHECKED) EndIf If $LeftClickCheckD = 0 Then GUICtrlSetState($LeftClickD, $GUI_UNCHECKED) EndIf ;---------------------------------------------------- If $RightClickCheckA = 1 Then GUICtrlSetState($RightClickA, $GUI_CHECKED) EndIf If $RightClickCheckA = 0 Then GUICtrlSetState($RightClickA, $GUI_UNCHECKED) EndIf If $RightClickCheckB = 1 Then GUICtrlSetState($RightClickB, $GUI_CHECKED) EndIf If $RightClickCheckB = 0 Then GUICtrlSetState($RightClickB, $GUI_UNCHECKED) EndIf If $RightClickCheckC = 1 Then GUICtrlSetState($RightClickC, $GUI_CHECKED) EndIf If $RightClickCheckC = 0 Then GUICtrlSetState($RightClickC, $GUI_UNCHECKED) EndIf If $RightClickCheckD = 1 Then GUICtrlSetState($RightClickD, $GUI_CHECKED) EndIf If $RightClickCheckD = 0 Then GUICtrlSetState($RightClickD, $GUI_UNCHECKED) EndIf ;---------------------------------------------------- If $PressKeyA = 1 Then GUICtrlSetData($KeysToSendA, $LogKeysToSendA) EndIf If $PressKeyB = 1 Then GUICtrlSetData($KeysToSendB, $LogKeysToSendB) EndIf If $PressKeyC = 1 Then GUICtrlSetData($KeysToSendC, $LogKeysToSendC) EndIf If $PressKeyD = 1 Then GUICtrlSetData($KeysToSendD, $LogKeysToSendD) EndIf ;---------------------------------------------------- GUICtrlSetData($SleepTimeA, $LogSleepTimeA) GUICtrlSetData($SleepTimeB, $LogSleepTimeB) GUICtrlSetData($SleepTimeC, $LogSleepTimeC) GUICtrlSetData($SleepTimeD, $LogSleepTimeD) ;---------------------------------------------------- GUICtrlSetData($Replace1, $LogReplace1) GUICtrlSetData($With1, $LogWith1) GUICtrlSetData($Replace2, $LogReplace2) GUICtrlSetData($With2, $LogWith2) GUICtrlSetData($Replace3, $LogReplace3) GUICtrlSetData($With3, $LogWith3) GUICtrlSetData($Replace4, $LogReplace4) GUICtrlSetData($With4, $LogWith4) GUICtrlSetData($Replace5, $LogReplace5) GUICtrlSetData($With5, $LogWith5) GUICtrlSetData($Replace6, $LogReplace6) GUICtrlSetData($With6, $LogWith6) GUICtrlSetData($Replace7, $LogReplace7) GUICtrlSetData($With7, $LogWith7) GUICtrlSetData($Replace8, $LogReplace8) GUICtrlSetData($With8, $LogWith8) GUICtrlSetData($Replace9, $LogReplace9) GUICtrlSetData($With9, $LogWith9) GUICtrlSetData($Replace10, $LogReplace10) GUICtrlSetData($With10, $LogWith10) EndFunc Func OpenGUI() $Hotkeys = 0 Hotkeys() MacroMakerGUI() EndFunc Func CoordFinder() HotKeySet($GetStartStopNew, "EndCoordFinder") Global $FindCoordsState $FindCoordsState = 1 While $FindCoordsState = 1 Sleep(50) Get_Mouse_Pos() WEnd EndFunc Func Get_Mouse_Pos() $Mpos = MouseGetPos() $Mpos_x = $Mpos[0] $Mpos_y = $Mpos[1] If $FindCoords = 1 Then GUICtrlSetData($L1X, $Mpos_x) GUICtrlSetData($L1Y, $Mpos_y) $LogL1X = ControlGetText("", "", $L1X) $LogL1Y = ControlGetText("", "", $L1Y) $L1_X = ControlGetText("", "", $L1X) $L1_Y = ControlGetText("", "", $L1Y) EndIf If $FindCoords = 2 Then GUICtrlSetData($L2X, $Mpos_x) GUICtrlSetData($L2Y, $Mpos_y) $LogL2X = ControlGetText("", "", $L2X) $LogL2Y = ControlGetText("", "", $L2Y) $L2_X = ControlGetText("", "", $L2X) $L2_Y = ControlGetText("", "", $L2Y) EndIf If $FindCoords = 3 Then GUICtrlSetData($L3X, $Mpos_x) GUICtrlSetData($L3Y, $Mpos_y) $LogL3X = ControlGetText("", "", $L3X) $LogL3Y = ControlGetText("", "", $L3Y) $L3_X = ControlGetText("", "", $L3X) $L3_Y = ControlGetText("", "", $L3Y) EndIf If $FindCoords = 4 Then GUICtrlSetData($L4X, $Mpos_x) GUICtrlSetData($L4Y, $Mpos_y) $LogL4X = ControlGetText("", "", $L4X) $LogL4Y = ControlGetText("", "", $L4Y) $L4_X = ControlGetText("", "", $L4X) $L4_Y = ControlGetText("", "", $L4Y) EndIf EndFunc Func EndCoordFinder() $FindCoordsState = 0 $FindCoords = 0 Hotkeys() LogKeys() EndFunc Func ReplaceKeys() $GetReplace1 = ControlGetText("", "", $Replace1) $LogReplace1 = ControlGetText("", "", $Replace1);LOG $GetWith1 = ControlGetText("", "", $With1) $LogWith1 = ControlGetText("", "", $With1);LOG HotKeySet($GetReplace1, "ReplaceWith1") $GetReplace2 = ControlGetText("", "", $Replace2) $LogReplace2 = ControlGetText("", "", $Replace2);LOG $GetWith2 = ControlGetText("", "", $With2) $LogWith2 = ControlGetText("", "", $With2);LOG HotKeySet($GetReplace2, "ReplaceWith2") $GetReplace3 = ControlGetText("", "", $Replace3) $LogReplace3 = ControlGetText("", "", $Replace3);LOG $GetWith3 = ControlGetText("", "", $With3) $LogWith3 = ControlGetText("", "", $With3);LOG HotKeySet($GetReplace3, "ReplaceWith3") $GetReplace4 = ControlGetText("", "", $Replace4) $LogReplace4 = ControlGetText("", "", $Replace4);LOG $GetWith4 = ControlGetText("", "", $With4) $LogWith4 = ControlGetText("", "", $With4);LOG HotKeySet($GetReplace4, "ReplaceWith4") $GetReplace5 = ControlGetText("", "", $Replace5) $LogReplace5 = ControlGetText("", "", $Replace5);LOG $GetWith5 = ControlGetText("", "", $With5) $LogWith5 = ControlGetText("", "", $With5);LOG HotKeySet($GetReplace5, "ReplaceWith5") $GetReplace6 = ControlGetText("", "", $Replace6) $LogReplace6 = ControlGetText("", "", $Replace6);LOG $GetWith6 = ControlGetText("", "", $With6) $LogWith6 = ControlGetText("", "", $With6);LOG HotKeySet($GetReplace6, "ReplaceWith6") $GetReplace7 = ControlGetText("", "", $Replace7) $LogReplace7 = ControlGetText("", "", $Replace7);LOG $GetWith7 = ControlGetText("", "", $With7) $LogWith7 = ControlGetText("", "", $With7);LOG HotKeySet($GetReplace7, "ReplaceWith7") $GetReplace8 = ControlGetText("", "", $Replace8) $LogReplace8 = ControlGetText("", "", $Replace8);LOG $GetWith8 = ControlGetText("", "", $With8) $LogWith8 = ControlGetText("", "", $With8);LOG HotKeySet($GetReplace8, "ReplaceWith8") $GetReplace9 = ControlGetText("", "", $Replace9) $LogReplace9 = ControlGetText("", "", $Replace9);LOG $GetWith9 = ControlGetText("", "", $With9) $LogWith9 = ControlGetText("", "", $With9);LOG- HotKeySet($GetReplace9, "ReplaceWith9") $GetReplace10 = ControlGetText("", "", $Replace10) $LogReplace10 = ControlGetText("", "", $Replace10);LOG $GetWith10 = ControlGetText("", "", $With10) $LogWith10 = ControlGetText("", "", $With10);LOG HotKeySet($GetReplace10, "ReplaceWith10") EndFunc Func ReassignKeysNotification() MsgBox($MB_SYSTEMMODAL, "Info", "Keys Reassigned") EndFunc Func ReplaceWith1() HotKeySet($GetReplace1) HotKeySet($GetReplace2) HotKeySet($GetReplace3) HotKeySet($GetReplace4) HotKeySet($GetReplace5) HotKeySet($GetReplace6) HotKeySet($GetReplace7) HotKeySet($GetReplace8) HotKeySet($GetReplace9) HotKeySet($GetReplace10) Send($GetWith1) HotKeySet($GetReplace1, "ReplaceWith1") HotKeySet($GetReplace2, "ReplaceWith2") HotKeySet($GetReplace3, "ReplaceWith3") HotKeySet($GetReplace4, "ReplaceWith4") HotKeySet($GetReplace5, "ReplaceWith5") HotKeySet($GetReplace6, "ReplaceWith6") HotKeySet($GetReplace7, "ReplaceWith7") HotKeySet($GetReplace8, "ReplaceWith8") HotKeySet($GetReplace9, "ReplaceWith9") HotKeySet($GetReplace10, "ReplaceWith10") EndFunc Func ReplaceWith2() HotKeySet($GetReplace1) HotKeySet($GetReplace2) HotKeySet($GetReplace3) HotKeySet($GetReplace4) HotKeySet($GetReplace5) HotKeySet($GetReplace6) HotKeySet($GetReplace7) HotKeySet($GetReplace8) HotKeySet($GetReplace9) HotKeySet($GetReplace10) Send($GetWith2) HotKeySet($GetReplace1, "ReplaceWith1") HotKeySet($GetReplace2, "ReplaceWith2") HotKeySet($GetReplace3, "ReplaceWith3") HotKeySet($GetReplace4, "ReplaceWith4") HotKeySet($GetReplace5, "ReplaceWith5") HotKeySet($GetReplace6, "ReplaceWith6") HotKeySet($GetReplace7, "ReplaceWith7") HotKeySet($GetReplace8, "ReplaceWith8") HotKeySet($GetReplace9, "ReplaceWith9") HotKeySet($GetReplace10, "ReplaceWith10") EndFunc Func ReplaceWith3() HotKeySet($GetReplace1) HotKeySet($GetReplace2) HotKeySet($GetReplace3) HotKeySet($GetReplace4) HotKeySet($GetReplace5) HotKeySet($GetReplace6) HotKeySet($GetReplace7) HotKeySet($GetReplace8) HotKeySet($GetReplace9) HotKeySet($GetReplace10) Send($GetWith3) HotKeySet($GetReplace1, "ReplaceWith1") HotKeySet($GetReplace2, "ReplaceWith2") HotKeySet($GetReplace3, "ReplaceWith3") HotKeySet($GetReplace4, "ReplaceWith4") HotKeySet($GetReplace5, "ReplaceWith5") HotKeySet($GetReplace6, "ReplaceWith6") HotKeySet($GetReplace7, "ReplaceWith7") HotKeySet($GetReplace8, "ReplaceWith8") HotKeySet($GetReplace9, "ReplaceWith9") HotKeySet($GetReplace10, "ReplaceWith10") EndFunc Func ReplaceWith4() HotKeySet($GetReplace1) HotKeySet($GetReplace2) HotKeySet($GetReplace3) HotKeySet($GetReplace4) HotKeySet($GetReplace5) HotKeySet($GetReplace6) HotKeySet($GetReplace7) HotKeySet($GetReplace8) HotKeySet($GetReplace9) HotKeySet($GetReplace10) Send($GetWith4) HotKeySet($GetReplace1, "ReplaceWith1") HotKeySet($GetReplace2, "ReplaceWith2") HotKeySet($GetReplace3, "ReplaceWith3") HotKeySet($GetReplace4, "ReplaceWith4") HotKeySet($GetReplace5, "ReplaceWith5") HotKeySet($GetReplace6, "ReplaceWith6") HotKeySet($GetReplace7, "ReplaceWith7") HotKeySet($GetReplace8, "ReplaceWith8") HotKeySet($GetReplace9, "ReplaceWith9") HotKeySet($GetReplace10, "ReplaceWith10") EndFunc Func ReplaceWith5() HotKeySet($GetReplace1) HotKeySet($GetReplace2) HotKeySet($GetReplace3) HotKeySet($GetReplace4) HotKeySet($GetReplace5) HotKeySet($GetReplace6) HotKeySet($GetReplace7) HotKeySet($GetReplace8) HotKeySet($GetReplace9) HotKeySet($GetReplace10) Send($GetWith5) HotKeySet($GetReplace1, "ReplaceWith1") HotKeySet($GetReplace2, "ReplaceWith2") HotKeySet($GetReplace3, "ReplaceWith3") HotKeySet($GetReplace4, "ReplaceWith4") HotKeySet($GetReplace5, "ReplaceWith5") HotKeySet($GetReplace6, "ReplaceWith6") HotKeySet($GetReplace7, "ReplaceWith7") HotKeySet($GetReplace8, "ReplaceWith8") HotKeySet($GetReplace9, "ReplaceWith9") HotKeySet($GetReplace10, "ReplaceWith10") EndFunc Func ReplaceWith6() HotKeySet($GetReplace1) HotKeySet($GetReplace2) HotKeySet($GetReplace3) HotKeySet($GetReplace4) HotKeySet($GetReplace5) HotKeySet($GetReplace6) HotKeySet($GetReplace7) HotKeySet($GetReplace8) HotKeySet($GetReplace9) HotKeySet($GetReplace10) Send($GetWith6) HotKeySet($GetReplace1, "ReplaceWith1") HotKeySet($GetReplace2, "ReplaceWith2") HotKeySet($GetReplace3, "ReplaceWith3") HotKeySet($GetReplace4, "ReplaceWith4") HotKeySet($GetReplace5, "ReplaceWith5") HotKeySet($GetReplace6, "ReplaceWith6") HotKeySet($GetReplace7, "ReplaceWith7") HotKeySet($GetReplace8, "ReplaceWith8") HotKeySet($GetReplace9, "ReplaceWith9") HotKeySet($GetReplace10, "ReplaceWith10") EndFunc Func ReplaceWith7() HotKeySet($GetReplace1) HotKeySet($GetReplace2) HotKeySet($GetReplace3) HotKeySet($GetReplace4) HotKeySet($GetReplace5) HotKeySet($GetReplace6) HotKeySet($GetReplace7) HotKeySet($GetReplace8) HotKeySet($GetReplace9) HotKeySet($GetReplace10) Send($GetWith7) HotKeySet($GetReplace1, "ReplaceWith1") HotKeySet($GetReplace2, "ReplaceWith2") HotKeySet($GetReplace3, "ReplaceWith3") HotKeySet($GetReplace4, "ReplaceWith4") HotKeySet($GetReplace5, "ReplaceWith5") HotKeySet($GetReplace6, "ReplaceWith6") HotKeySet($GetReplace7, "ReplaceWith7") HotKeySet($GetReplace8, "ReplaceWith8") HotKeySet($GetReplace9, "ReplaceWith9") HotKeySet($GetReplace10, "ReplaceWith10") EndFunc Func ReplaceWith8() HotKeySet($GetReplace1) HotKeySet($GetReplace2) HotKeySet($GetReplace3) HotKeySet($GetReplace4) HotKeySet($GetReplace5) HotKeySet($GetReplace6) HotKeySet($GetReplace7) HotKeySet($GetReplace8) HotKeySet($GetReplace9) HotKeySet($GetReplace10) Send($GetWith8) HotKeySet($GetReplace1, "ReplaceWith1") HotKeySet($GetReplace2, "ReplaceWith2") HotKeySet($GetReplace3, "ReplaceWith3") HotKeySet($GetReplace4, "ReplaceWith4") HotKeySet($GetReplace5, "ReplaceWith5") HotKeySet($GetReplace6, "ReplaceWith6") HotKeySet($GetReplace7, "ReplaceWith7") HotKeySet($GetReplace8, "ReplaceWith8") HotKeySet($GetReplace9, "ReplaceWith9") HotKeySet($GetReplace10, "ReplaceWith10") EndFunc Func ReplaceWith9() If 1 Then HotKeySet($GetReplace1) HotKeySet($GetReplace2) HotKeySet($GetReplace3) HotKeySet($GetReplace4) HotKeySet($GetReplace5) HotKeySet($GetReplace6) HotKeySet($GetReplace7) HotKeySet($GetReplace8) HotKeySet($GetReplace9) HotKeySet($GetReplace10) Send($GetWith9) HotKeySet($GetReplace1, "ReplaceWith1") HotKeySet($GetReplace2, "ReplaceWith2") HotKeySet($GetReplace3, "ReplaceWith3") HotKeySet($GetReplace4, "ReplaceWith4") HotKeySet($GetReplace5, "ReplaceWith5") HotKeySet($GetReplace6, "ReplaceWith6") HotKeySet($GetReplace7, "ReplaceWith7") HotKeySet($GetReplace8, "ReplaceWith8") HotKeySet($GetReplace9, "ReplaceWith9") HotKeySet($GetReplace10, "ReplaceWith10") EndIf EndFunc Func ReplaceWith10() HotKeySet($GetReplace1) HotKeySet($GetReplace2) HotKeySet($GetReplace3) HotKeySet($GetReplace4) HotKeySet($GetReplace5) HotKeySet($GetReplace6) HotKeySet($GetReplace7) HotKeySet($GetReplace8) HotKeySet($GetReplace9) HotKeySet($GetReplace10) Send($GetWith10) HotKeySet($GetReplace1, "ReplaceWith1") HotKeySet($GetReplace2, "ReplaceWith2") HotKeySet($GetReplace3, "ReplaceWith3") HotKeySet($GetReplace4, "ReplaceWith4") HotKeySet($GetReplace5, "ReplaceWith5") HotKeySet($GetReplace6, "ReplaceWith6") HotKeySet($GetReplace7, "ReplaceWith7") HotKeySet($GetReplace8, "ReplaceWith8") HotKeySet($GetReplace9, "ReplaceWith9") HotKeySet($GetReplace10, "ReplaceWith10") EndFunc Func ClearKeys1() $GetReplace1 = $LogReplace1 $GetWith1 = "" $LogWith1 = "" GUICtrlSetData($Replace1, "") GUICtrlSetData($With1, "") HotKeySet($GetReplace1) ReplaceKeys() EndFunc Func ClearKeys2() $GetReplace2 = $LogReplace2 $GetWith2 = "" $LogWith2 = "" GUICtrlSetData($Replace2, "") GUICtrlSetData($With2, "") HotKeySet($GetReplace2) ReplaceKeys() EndFunc Func ClearKeys3() $GetReplace3 = $LogReplace3 $GetWith3 = "" $LogWith3 = "" GUICtrlSetData($Replace3, "") GUICtrlSetData($With3, "") HotKeySet($GetReplace3) ReplaceKeys() EndFunc Func ClearKeys4() $GetReplace4 = $LogReplace4 $GetWith4 = "" $LogWith4 = "" GUICtrlSetData($Replace4, "") GUICtrlSetData($With4, "") HotKeySet($GetReplace4) ReplaceKeys() EndFunc Func ClearKeys5() $GetReplace5 = $LogReplace5 $GetWith5 = "" $LogWith5 = "" GUICtrlSetData($Replace5, "") GUICtrlSetData($With5, "") HotKeySet($GetReplace5) ReplaceKeys() EndFunc Func ClearKeys6() $GetReplace6 = $LogReplace6 $GetWith6 = "" $LogWith6 = "" GUICtrlSetData($Replace6, "") GUICtrlSetData($With6, "") HotKeySet($GetReplace6) ReplaceKeys() EndFunc Func ClearKeys7() $GetReplace7 = $LogReplace7 $GetWith7 = "" $LogWith7 = "" GUICtrlSetData($Replace7, "") GUICtrlSetData($With7, "") HotKeySet($GetReplace7) ReplaceKeys() EndFunc Func ClearKeys8() $GetReplace8 = $LogReplace8 $GetWith8 = "" $LogWith8 = "" GUICtrlSetData($Replace8, "") GUICtrlSetData($With8, "") HotKeySet($GetReplace8) ReplaceKeys() EndFunc Func ClearKeys9() $GetReplace9 = $LogReplace9 $GetWith9 = "" $LogWith9 = "" GUICtrlSetData($Replace9, "") GUICtrlSetData($With9, "") HotKeySet($GetReplace9) ReplaceKeys() EndFunc Func ClearKeys10() $GetReplace10 = $LogReplace10 $GetWith10 = "" $LogWith10 = "" GUICtrlSetData($Replace10, "") GUICtrlSetData($With10, "") HotKeySet($GetReplace10) ReplaceKeys() EndFunc Func ClearKeysALL() ClearKeys1() ClearKeys2() ClearKeys3() ClearKeys4() ClearKeys5() ClearKeys6() ClearKeys7() ClearKeys8() ClearKeys9() ClearKeys10() EndFunc Func HideMacroMakerGUI() GUISetState(@SW_HIDE, $Form1) HotKeySet($GUIOpenNew, "OpenMacroMakerGUI") EndFunc Func OpenMacroMakerGUI() GUISetState(@SW_SHOW, $Form1) HotKeySet($GUIOpenNew) EndFunc Func End() Exit EndFunc I might update the code sometime in the future to include more macro features.
       
      Keep in mind that you need to use {F1} and {END} brackets to change the hotkeys.
      "Press" will type anything out in plain text, {a} {b} {c} can be used to press a key, instead of typing inside a window; case sensitive to upper and lowercase
      Use the Start_Stop key to set Coords for the Coord Finder
      Leave anything you don't use, blank
    • SkysLastChance
      By SkysLastChance
      I have a Razer Blackwidow Ultimate keyboard that has 5 extra keys marked M1 - M5. I was wondering if I would be able to setup Macros in AutoIt using these.
      I saw that Fn key is not possible. 
      I am also aware that the M1 keys work with razor snyapse. However, I am at work and can't download that program.
      If someone could let me know and point me in the right direction if it is possible I would be grateful.
    • TheAutomator
      By TheAutomator
      How can you get the downloads folder in AutoIT?
      As far as i know there isn't a macro for it right? like @Downloads or something?
      The ugly solution would be typing in the whole path but what if the user has chosen another location?
      Need to clear that folder regularly on my work and on different accounts..
      regards, TheAutomator
    • afzalw
      By afzalw
      I am using Autoit to automate another software.  I am looking to create a piece of code which can select the option from a combo box.  I know what option I want to select and I have stored it in a string but nothing seems to be working for me. 
      I am able to click on the Control by using this code.
      ControlClick("Import/Export Table Name", "","[NAME:cmbTableName]"); This is what I was thinking but doesn't work for me.
      ControlCommand("Import/Export Table Name", "", "[NAME:cmbTableName]", "SelectString", $MyOptionName)  
      If it helps: The option name that I want to select is also stored in clipboard.
      Any comments on what am I missing here will be appreciated.
      Thanks
       
    • ur
      By ur
      I wrote a macro for outlook to send an email.
      Till yesterday it worked, don't know why it is not working today
      I am getting below error when I ran the macro.