Hi all,
I've included my script below, and although i've tried having a play i can't get my head around creating GUI's.
I was wondering if someone could help me write into the script a pop up that prompts for the users username and password the first time either hotkeys are run (eg first use after the script is loaded) and then stores/refers to this at the appropriate points in the script. That way different users are able to take advantage of my script. When they've finished with the script, if they right click and exit the script from the taskbar the next person to load it will be prompted again.
I know its a big ask, but after trying to find tutorials or reverse engineer other peoples examples i've had no luck =(
#MaxThreadsPerHotkey 1 ;prevents someone executing the hotkey whilst its already running #1:: IfWinExist New-Entry { WinActivate ;activate the window send, {F11 2}{F1 4} ;send keystrokes F11 x2 F1 x4 } else { Run, C:\RFW\entry.exe WinWait New-Entry WinActivate Sleep, 500 Send, live{ENTER} Sleep, 500 Send, 1{ENTER} Sleep, 500 Send, username{ENTER} ;GUI to prompt for this entry and then refer to it (store it in memory) until the script is ended from the taskbar Sleep, 500 Send, password{ENTER} ;GUI again } ;end if Sleep, 500 Send, LOC{ENTER} KeyWait, Enter, D ;wait for the Enter ket to be pressed and released Send, {F11} Send, I{ENTER} Send, {ENTER 3} Send, DELPT19{ENTER} Send, {ENTER 2} Send, F{ENTER} Send, username{ENTER} ;GUI reference Send, password{ENTER} ;GUI reference return ;ends this script routine #2:: IfWinExist New-Entry { WinActivate send, {F11 2}{F1 4} } else { Run, C:\RFW\entry.exe WinWait New-Entry WinActivate Sleep, 500 Send, live{ENTER} Sleep, 500 Send, 1{ENTER} Sleep, 500 Send, username{ENTER} ;GUI reference Sleep, 500 Send, password{ENTER} ;GUI reference } Sleep, 500 Send, 2 1 2{ENTER} Send, {ENTER 3} Send, DELPT19{ENTER} Send, {ENTER 2} KeyWait, F11, D Sleep, 500 WinActivate, New-Entry Send, F{ENTER} Send, username{ENTER} ;GUI reference Send, password{ENTER} ;GUI reference return #IfWinActive, New-Entry ;If new-entry is activated then the hotkey Esc makes the script close and reload. I understand this will also make the user have to re-enter their username and password. Esc:: reload return #IfWinActive ;ends the if active command