EpicValor Posted March 3, 2018 Share Posted March 3, 2018 I see the ControlSend command, but not sure how to convert the keystrokes to a controlsend format. Does every line in the script need a controlsend equivalent line? Sleep("5000") Sleep("10000") $i = 0 Do If WinActive( "", "" ) Then Send("{1 down}") Sleep("1500") Send("{1 up}") Sleep("500") Send("{- down}") Send("{- up}") Sleep("2500") EndIf Until $i = 1 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 3, 2018 Moderators Share Posted March 3, 2018 @EpicValor yes, a ControlSend corresponds to a Send. But instead of sending blindly, you target a specific control on a window. If you can explain more what exactly you are trying to automate, and in what app, we can probably assist further. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Bilgus Posted March 3, 2018 Share Posted March 3, 2018 ;Sleep("5000") ;Sleep("10000") $i = 0 Local $hWnd = 0 Const $_SEND_RAW = (1) Opt("SendKeyDelay", 500) Opt("SendKeyDownDelay", 1500) Do $i += 1 $hWnd = WinActive( "", "" ) If $hWnd Then ControlSend($hWnd, "", "", "1-") ;ControlSend($hWnd, "", "", "1-", $_SEND_RAW );If you dont want/need special keys... Sleep(1000) Endif ;Send("{1 down}") ;Sleep("1500") ;Send("{1 up}") ;Sleep("500") ;Send("{- down}") ;Send("{- up}") ;Sleep("2500") Until $i > 10 Opt("SendKeyDelay", 5) ;Defaults Opt("SendKeyDownDelay", 5) Link to comment Share on other sites More sharing options...
Bilgus Posted March 3, 2018 Share Posted March 3, 2018 Now as for the minimized window part WinActive("","") is not going to give you the handle of the minimized window I'm assuming you are getting the handle prior to minimizing it Link to comment Share on other sites More sharing options...
EpicValor Posted March 3, 2018 Author Share Posted March 3, 2018 Yeah, I have the minimized handle if it's the title of the active screen before I minimize it. I had to remove the name, because asking about certain programs, even if they are defunct, and no longer in business, is against the rules. The program itself has a macro tool to automate activities, but it's clunky. The original script did work if it was the active screen. Thanks for the template. I really needed to see the format as it differs from the original. I'll try it when I get home. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2018 Moderators Share Posted March 3, 2018 EpicValor, Quote I had to remove the name, because asking about certain programs, even if they are defunct, and no longer in business, is against the rules. I see you did not read those rules to which I linked very carefully - you missed the part that says: "Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above" Do NOT start another thread on this - our patience has limits. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2018 Moderators Share Posted March 3, 2018 EpicValor, And sending me snotty PMs does nothing to affect the outcome - you are not a "special case" anymore than any other gamer who has tried that line. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 3, 2018 Moderators Share Posted March 3, 2018 @Bilgus one final addendum, as you are somewhat new to the forum. Typically, if a Mod has stepped into a thread to ask a user specifically what they are trying to automate, there is a reason. As you can see from the outcome above, we've seen most everything and heard most every argument, so have a pretty good idea on these kinds of things. In the future we would appreciate it if you would hold off helping until that determination has been made. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts