Jump to content

script/exe stops if launched in startup


Recommended Posts

I'm a bit noob at this autoIT biz so I apologize in advance.

I have a small script compiled into an exe. It works and does what it is supposed to (which is tab a couple times and press enter).

However I need this file to launch at startup (in windows startup folder) . The file does start after booting...but the program opens and the script does not seem to perform the TAB-TAB-ENTER task. It just sits there.

Is there a service that autoIT is dependent upon, which perhaps has not loaded before the startup folder?

Also, this is a really noob question but...

Does anything AutoIT related need to be installed for compiled exes to run on other computers. I ask because this file will be going on several computers.

Link to comment
Share on other sites

  • Moderators

Hi, icecom3. To answer your questions, no AutoIt does not rely on a specific service. And if you have the script compiled into an executable, you do not need anything else for it to run on Windows PCs.

Unfortunately, we're shooting blind without seeing the script you're using. If you could post the full script, we can definitely try to assist you in getting it to run on startup. ;)

"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

It could be since it's run at startup, then whatever you are trying to interact with loses focus so when the tab, tab, enter is sent, it is not picked up by the correct window.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

Yes, the script starts the application, it just does not run all of the key functions. Sometimes it will TAB TAB...but the ENTER will fail. Its different each time.

ah...that makes sense. Well I added a batch file, at startup which points to the autoIT script, and I added a delay. That helps a lot but occasionally it still misses the whole TAB TAB ENTER. I figured that something related to the startup process is getting in the way, so delaying it a few seconds helped. I might just add more delay.

#region ---Au3Recorder generated code Start (v3.3.7.0)  ---
#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
EndFunc
Func _WinWaitActivate($title,$text,$timeout=0)
WinWait($title,$text,$timeout)
If Not WinActive($title,$text) Then WinActivate($title,$text)
WinWaitActive($title,$text,$timeout)
EndFunc
_AU3RecordSetup()
#endregion --- Internal functions Au3Recorder End ---

Run('C:Program FilesETWCetwc.exe')
_WinWaitActivate("ETWC","")
Send("{TAB}{TAB}{ENTER}")
#endregion --- Au3Recorder generated code End ---
Link to comment
Share on other sites

try using the window info tool that comes with autoit, you may be able to use class and instance to control click and control send. that will interact with the window wether it has focus or not.

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

  • Moderators

icecom3, is this ETWC the one from Jedi Knight 3? If we know the application, it may be easier to automate the control of it.

"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

  • Moderators

That being said, please take a look at our forum rules. There is a zero tolerance rule against automating/interacting with games.

"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

  • Moderators

icecom3,

Please read the rules to which JLogan3o13 linked you and respect them when you post in future. ;)

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...