Jump to content
Sign in to follow this  
dorochet

Duplicate, Please Delete

Recommended Posts

dorochet

I don't know how this post was duplicated, I apologize, Please delete this copy

Edited by dorochet

Share this post


Link to post
Share on other sites
PsaltyDS

Ok when I run this script I get one of two errors. In the code below, I try to activate the shortcut to the program I want to run. I get an error in line 8 saying it can't run the external program. I have also inserted the directory of the actual .EXE file. This say Error can't run Client.ini, which is the configuration file for the Gameclient. However, if I run that same directory in the windows Run box, the client opens up just fine. Any ideas?

;
; AutoIt Script
; GameClient Login
; by Dorochet
; 

; Open the game client
Run("C:\GameClient.exe.lnk")

;Wait for the window to be active
WinWaitActive("GameClientWnd")

;Enter the password
Send("Mypasswpord{Enter}")
Try ShellExecute() instead of Run(). You can't "Run" a .lnk, .pdf, .txt, or .xls file. You need Windows to look up the file association and take the proper action. That's what ShellExecute() does that Run() doesn't.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
PsaltyDS

Thanks for the help, I have stopped using the shortcut and now point directly to the program, here is the new code. However I still have a problem, the program does not run properly, I assume that when the program is called, it tries to open the config file "Client.ini". When using the script I get an error saying it is inable to open "Client.ini". This is not a problem when I just run the program in windows or from the run command in windows. Whats the issue?

;
; AutoIt Script
; GameClient Login
; by Dorochet
; 

; Open the game client
ShellExecute("C:\Program Files\Galactica\GameClient\GameClient.exe")

;Wait for the window to be active
WinWaitActive("GameClientWnd")

;Enter the password
Send("Mypasswpord{Enter}")
You also have a duplicate post... and I answered in the other one...

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.