Jump to content

Interesting Issue


akervin
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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

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

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

  • Moderators

akervin,

Please read the Forum Rules, then you will understand why this thread is now locked. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...