Jump to content

BartDog

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by BartDog

  1. Thank you Caramen and MilesAhead. I will be looking into your suggestions more this weekend. Also I found these 2 libraries by Yashied that look like they will work awesomely if only I can figure them out: HotKeyInput UDF Library v1.3 HotKey UDF Library v1.8
  2. OK I use a simple script from a GUI (similar to the example below) to send strings of letters to whatever I am working on. I use this as a shortcut to send whatever things I happen to need to type multiple times a day like my name. I have this HotKeySet to my F6 key and it works great. What I want to do is use a ComboBox to indicate what the hotkey is set to. So I could have a list of keys rather then it set to just F6. I can’t seem to find anything in the help files under ComboBox or HotKeySet or on the Forums. Am I blind? Or does anyone have somewhere else I can look or the answer to my dilemma? This example is what I am trying to get working. #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> HotKeySet("$HotKey", "OutPut") $Form1 = GUICreate("Test", 288, 215, 519, 347) $HotKey = GUICtrlCreateCombo(" set hotkey ", 128, 64, 121, 25) GUICtrlSetData(-1, "F2|F3|F4|F5|F6") ;have tried {F2}|{F3}... GUISetState() $Label1 = GUICtrlCreateLabel("UserName", 16, 64, 36, 17) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func OutPut() Send("The Text or Name Here") Send("{ENTER}") EndFunc ;==>OutPut  My heart is not set on a combo box if anyone has another idea. It would be cool to have a button to push to map the next key hit but that seems overly complicated for what I need. Thanks In advance for any advice!
  3. I have added $BS_PUSHLIKE to my GUI and it is working great. I will avoid the button color changing for now but I will store the info for future use. Thank you all for the info!
  4. I have a GUI setup to run a few different programs and updates. It is working fine but since some of them take some time I might end up forgetting which of the buttons I have already pushed. I am looking for a way to indicate which buttons have been pushed. Say maybe change the color, or check a box next to it or really anything that will be a visual reference. If anyone has a suggestion, example, or just can point me in the right direction I would appreciate it.
  5. You are so right. The solution was some of your suggestions and a few mistake corrections (Sequence error on my part). Ended up with the following: If WinExists("Error", "&OK") Then WinActivate("Error", "&OK") Send("{Enter}") Sleep(2000) Run('C:CMProgram.exe') EndIf Thanks Again.
  6. I finally got some machines up to do some testing and I believe I have finally got this working. Thanks you very much for your assistance.
  7. I shall try out some of the Advanced Window Descriptions asap. Though it may be a few more days before I can. Thanks for the info.
  8. Thanks for the suggestion. I have tried winexists (with the script below) and it did not work either. I did put in the extra info from AU3Info which just the text "&OK" which I believe is not a requirement. Run('C:CMProgram.exe') Sleep(5000) If WinExists("Error", "&OK") Then Send("{ENTER}") Sleep(2000) Run('C:CMProgram.exe') EndIf _WinWaitActivate("Update Application", "") Send("{ENTER}") Any other ideas too look into would be appriciated.
  9. Greetings all! Obviously I am new to this forum and even more obviously I am new to AutoIT. But I am enjoying it and getting a lot of useful things out of it. I have been using these forums since I started messing around with AutoIT for hints and things to research. But I am now stuck on this one issue at the moment and was hoping someone could point me in the right direction or just point out what I am doing wrong with my scripts. This part of my script is pretty simple. All I am having it do is launch a program and launch an update when the update window shows. All that works fine but every once in a while it gets an error right after launching the program. At that point I am wanting it to clear the error (enter or click OK) and relaunch the program and start the update. I have tried the following scripts but none seem to work. Any assistance would be appreciated. Run('C:CMProgram.exe') If WinActivate("Error", "") Then Send("{ENTER}") Sleep(2000) Run('C:CMProgram.exe') EndIf _WinWaitActivate("Update Application", "") Send("{ENTER}") ;===================================================== Func CMerror() If _WinWaitActivate("Error", "&OK") Then MouseClick("left", 266, 11, 1) MouseClick("left", 286, 98, 1) Sleep(2000) Run('C:CMProgram.exe') EndIf EndFunc ;==>CMerror AdlibRegister("CMerror") Run('C:CMProgram.exe') _WinWaitActivate("Update Application", "") Send("{ENTER}") AdlibUnRegister("CMerror") ;================================================== Run('C:CMProgram.exe') _WinWaitActivate("Error", "", 15) Send("{ENTER}") Sleep(2000) Run('C:CMProgram.exe') _WinWaitActivate("Update Application", "") Send("{ENTER}")
×
×
  • Create New...