Dado Posted October 18, 2013 Share Posted October 18, 2013 Good day. I am new to autoit and I love it so far but I got some issue. Lets say part of my script compiled into *.exe is like: HotKeySet("+{F2}", "_F2a_Func") Func _F2a_Func() MsgBox(0, "", "hotkey pressed") EndFunc ;==>_F2a_Func While 1 Sleep(100);idle around WEnd Everything is working fine when I just doubleclick it and try the hotkey, but I need to have that hotkey working on background while the other application is active and I am working with it. The thing is, when I try that with other application like video player or photoshop in front - it works, but when I alt-tab to my desired application to work, the hotkey do nothing. Any clues? I have tried to change the hotkey to other combination but no luck. Link to comment Share on other sites More sharing options...
JohnOne Posted October 18, 2013 Share Posted October 18, 2013 desired application might be eating the hotkey. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Dado Posted October 18, 2013 Author Share Posted October 18, 2013 well, I thought that was a case too but: ^n (control + n) in mspaint.exe opens dialog prompt to create new file without running my script I set the hotkey to ^n, ran the script, alt-tab to mspaint, pressed ^n and my msgbox appeared and no dialog prompt popped out - so application (in this case mspaint) did not eat the hotkey even it have that hotkey binded in my application ( in which I looked up in settings to be sure that ^n hotkey is unset) no msgbox Link to comment Share on other sites More sharing options...
JohnOne Posted October 18, 2013 Share Posted October 18, 2013 I can see why you would think that discounts the possibility, but truth is that applications respond or act differently. I'd first check to see what other hotkeys your 'desired application' does or does not respond to when active. I'm no hotkey expert by the way, just thinking literally. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Dado Posted October 18, 2013 Author Share Posted October 18, 2013 I did. For example 'desired application' do its own thing with just simple keypress of p, c, b, q, and also alt,control and shift combinations such as !q, !w, +r and many more. On the other hand, there is some keypresses and modifier combinations which is not bind. It all can be seen in settings of that application (and also changed). It do not matter if I set my hotkey in script to allready binded keypress/combination or unbinded. It still do nothing (no msgbox).It seems to me strange because in casual mspaint it works like expected. Maybe there is a way how to make hotkey 'global' and to work no matter which kind of application is active. Link to comment Share on other sites More sharing options...
l3ill Posted October 18, 2013 Share Posted October 18, 2013 Just FYI, I tested your app on my sytem: Win 7 SP1 w/ PS VLC and several others and I cannot recreate the problem you have described. iow; It works fine here...;-) My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
Dado Posted October 18, 2013 Author Share Posted October 18, 2013 The thing is, when I try that with other application like video player or photoshop in front - it works, but when I alt-tab to my desired application to work, the hotkey do nothing You see now? Probably you cant recreate cause you dont have that app to try with. Anyway, if it is application fault, I am looking for a workaround. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 18, 2013 Moderators Share Posted October 18, 2013 (edited) Dado,And so the problem is almost certainly your "desired application" not respnding to the HotKey. If, as seems very likely given the coy manner in which you refuse to identify the app in question, it is a game of some sort there are probably anti-bot measures in place to prevent you from automating it. And as explained in the Forum rules you will get no help here to find a workaround. If, despite all the signs, it is not a game then please tell us what it is so that we can try and help you. M23 Edited October 18, 2013 by Melba23 Typo 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...
Dado Posted October 18, 2013 Author Share Posted October 18, 2013 I know forum rules. Despite all signs? It is not a game but in my opinion if it even was a game, it is still not against rules cause I am not trying automate THAT application, I just want to run MY functions in my scripts which do not interact with that 'game' at all. I am not asking for picture position recognition or OCR, mouse moves and automating clicks. I will be doing keypresses on my own, but only need to have that application activated and working in front, while my hotkey activated functions in my script do other for me usefull things (timing and playing short wav files in most cases). Traktor DJ Studio 3 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 18, 2013 Moderators Share Posted October 18, 2013 Dado,That was not so difficult was it? So why the initial reluctance to tell us? It would have saved (both of) my typing fingers from even more wear and tear. 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...
Dado Posted October 18, 2013 Author Share Posted October 18, 2013 You asked, I answered. No one asked stright before you. I just highly doubt somebody owns that software to give it a closer look. Anyway, do you think it is possible to solve that 'anti-bit measures in place' issues or what do you call it, or am I better off trying something other than autoit? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 18, 2013 Moderators Share Posted October 18, 2013 Dado,Sorry - that should have read "anti-bot measures". And I strongly doubt that a DJ Studio will have them in place - a public heath warning for the damage its output might do to your hearing perhaps, but not anti-bot protection. So I am at a loss as to why this particular app does not like your HotKeys. Perhaps it eats all keys and just actions the ones it recognises while discarding all others. Have you tried using some different key combinations for your app to see if that is indeed the case? 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...
Dado Posted October 18, 2013 Author Share Posted October 18, 2013 I have tried to change the hotkey to other combination but no luck. Link to comment Share on other sites More sharing options...
JohnOne Posted October 18, 2013 Share Posted October 18, 2013 There's a hotkey udf in example forum, it allows extra conditions and what not. I suggest you try that next. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now