Sign in to follow this  
Followers 0
akervin

Interesting Issue

7 posts in this topic

#1 ·  Posted (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 by akervin

Share this post


Link to post
Share on other sites



Hi, Akervin, welcome to the forum. Unfortunately, it is a little difficult to help you troubleshoot without seeing the code. :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

should I increase the initial sleep in order to accomidate a different cpu/network connection speed.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0