akervin Posted February 9, 2012 Share Posted February 9, 2012 (edited) I have a script that was passed on to me by a friend. He and one other have had success running the script without any issue. I have run my own scripts using autoit successfully in the past as well. My problem is the script that I received from a friend works... But only works on certain screens. If I pull up notepad I can see that the keys that need to be pressed are showing up but when I change the focus window to the program I want the script to run it doesn’t work. Could this have anything to do with running programs as an admin... The program I want to use the .exe on is run as admin and its the only thing I can think of. That or a setting in my AutoIt parent program is different. I know the issue isnt with the code cause it works fine on other screens and cpu's (hence the lack of snippet of code). Im hoping this is a setting issue and appreciate any responses. Edited February 9, 2012 by akervin Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 9, 2012 Moderators Share Posted February 9, 2012 Hi, Akervin, welcome to the forum. Unfortunately, it is a little difficult to help you troubleshoot without seeing the code. "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...
akervin Posted February 9, 2012 Author Share Posted February 9, 2012 Like I said in the post. the code works great except when a particular program, thats run as administrator, is the focus window. This program is the only program that "it has no affect on". It works on my desktop icons, it works in word, excel, outlook, wordpad, IE8, Firefox... etc... I can go all do... but when I open this program the programs executions have no effect. If hit the hotkeys manually the actions work in the program but if the program hits the same hotkeys, that work in the above stated programs just fine, it doesnt work. Its 40 lines long at best, works on 3 different computers and every type of program running but not this particular program. Its extremely frustrating. I have to move to a different cpu to get it to do what I want. HotKeySet("^!z","Movment");^!z is Ctrl+Alt+'z' to run the Movment HotKeySet("^!x","End");^!x is Ctrl+Alt+'x' to close the Movment While 1 Sleep(100) WEnd Func Movment() While 1 send("{5}") MouseClick("left",1292,841,7,0) MouseClick("left",1292,841,7,0) MouseClick("left",1292,841,7,0) send("!{g}") Send("!{h}") Send("!{g}") Sleep(700) Send("!{h}") Send("{v}") Send("!{g}") Sleep(700) Send("!{h}") Send("{v}") Send("!{g}") Sleep(700) Send("!{h}") Send("!{g}") WEnd EndFunc Func End() Exit EndFunc Link to comment Share on other sites More sharing options...
akervin Posted February 9, 2012 Author Share Posted February 9, 2012 should I increase the initial sleep in order to accomidate a different cpu/network connection speed. Link to comment Share on other sites More sharing options...
Bert Posted February 9, 2012 Share Posted February 9, 2012 Would you care to provide the name of this particular name of this program? That would help. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
akervin Posted February 9, 2012 Author Share Posted February 9, 2012 Its a Online Game. SWTOR.exe. the game currently doesnt, but should eventually, have macros enabled so in the meantime my eventual end process is to click on a button and it exicute 2, 3, or 4 commands consecitivly. This process was an inital test to see how autoit interracted with the game. so far not so good for me. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 9, 2012 Moderators Share Posted February 9, 2012 akervin,Please read the Forum Rules, then you will understand why this thread is now locked. 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...
Recommended Posts