Guild Wars Forums - GW Guru
 
 

Go Back   Guild Wars Forums - GW Guru > The Inner Circle > Community Works

Notices

Reply
 
Thread Tools Display Modes
Old Nov 05, 2008, 06:03 PM // 18:03   #1
Jungle Guide
 
AtomicMew's Avatar
 
Join Date: Apr 2005
Profession: N/A
Advertisement

Disable Ads
Default autoload TexMod (autoIt script)

Code:
ShellExecute("C:\program files\Guild Wars\TexMod.exe") ;TexMod path
Do
	sleep(100)
Until (WinExists("TexMod"))
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:2]")
Do
	sleep(100)
Until (WinExists("Select Executable"))
ControlSetText("Select Executable", "","[CLASS:Edit; INSTANCE:1]","C:\program files\Guild Wars\Gw.exe") ;Gw.exe path
ControlClick("Select Executable", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(100)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\program files\Guild Wars\Tyria - EotN Cartography Made Easy.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:11]")
WinClose("TexMod")
AutoIt script (www.google.com)

Very, very basic script to autoload texmod with your tpf file. Works for me. Pretty self-explanatory - replace paths with your own.
AtomicMew is offline   Reply With Quote
Old Nov 13, 2008, 12:20 AM // 00:20   #2
Furnace Stoker
 
MisterB's Avatar
 
Join Date: Oct 2005
Location: Planet Earth, Sol system, Milky Way galaxy
Guild: [ban]
Profession: W/
Default

I'll post my reply from the other thread here, since it is specific to your script.
Quote:
Originally Posted by traversc View Post
What exactly are you having trouble with? Maybe I can help (I wrote that autoIt script) Selecting the correct tpf file is the most iffy part of the script. What TexMod does is, when you press the tpf button, opens a new window (which looks like a menu) with options to select the most recent or select from a destination. The new window has no title or text, which is very annyoing to deal with.

You might try stepping through each command to find where exactly the script is having trouble. Or you could try adding delays in between commands, which might help if you have a slower computer.
The problem I first had with a copy/paste of your script(and changing paths, of course) was that TexMod popped up a window when you click the select application button. It was a similar window as the select tpf one(Class: #32768), and the script paused there. If I understand it correctly, the script opened TexMod, clicked the select application button, and then entered a "sleep" state, or delay, until the select executable window appears. Since that intermediate window popped up first, the select .exe window never occurrred.

I changed it to just enter DOWN, DOWN, ENTER as a basic workaround to skip the select .exe step, but that only works because Guild Wars is the only program I use TexMod with. I should probably input a DOWN, ENTER command between the select application button and the Select executable window, but I haven't worked out the proper code.

I am currently trying what you proposed, namely stepping through each command, but I am not a programmer, and I have limited scripting experience. I have gotten to the point where TexMod opens the Select Package window, but nothing is entered into the text window, and then the script presses "open," then "Run." I suppose the text entry is the step that is causing the error for me now. I may need to input a delay to allow time for text entry. Unsure how to do that, or what delay, if needed. I could just input a series of arrows and enter again, but I would rather learn how to enter text into that darned box.

The only command line tool I have used is Avisynth. I do not yet know how to insert a delay. Frankly, I am working by trial and error, mostly error at this point.
Apologies for the long post.

Last edited by MisterB; Dec 12, 2008 at 12:52 AM // 00:52.. Reason: removed non-working code
MisterB is offline   Reply With Quote
Old Nov 13, 2008, 01:19 AM // 01:19   #3
Jungle Guide
 
AtomicMew's Avatar
 
Join Date: Apr 2005
Profession: N/A
Default

That's strange, I don't get the first pop-up window when I press the select application button. What version are you using/where did you download it? I'm using v0.9b.

Also, you do not need to do guess and check! AutoIt comes with this awesome utility called "AutoIt Window Info" you can find it in the start program group. It will give you the class, instance etc you will need to uniquely identify the text box. Read the help file on "Controls" too.

To add a delay to the script use sleep(X) where X is in milliseconds. So sleep(1000) would delay the script for 1 second.
AtomicMew is offline   Reply With Quote
Old Nov 14, 2008, 03:29 AM // 03:29   #4
Furnace Stoker
 
MisterB's Avatar
 
Join Date: Oct 2005
Location: Planet Earth, Sol system, Milky Way galaxy
Guild: [ban]
Profession: W/
Default

I am using Texmod v0.9b, and I downloaded it from the link at the official wiki.

I haven't been successful at opening Gw.exe using the select executable window, but I now have a working script that loads nine mods and launches Guild Wars. Still need to debug a bit, and it's grown to 117 lines of code. ~Three dozen attempts, more or less.

This is so cool. Thanks for posting this; I had not heard of AutoIt before now. Thanks for your help in pointing me in the right direction, too. That AutoIt Window Info tool was just what I needed. Much appreciated.
MisterB is offline   Reply With Quote
Old Nov 16, 2008, 04:16 AM // 04:16   #5
Ascalonian Squire
 
Join Date: Oct 2005
Guild: Rangers of Ascalon Return [ROAR]
Profession: N/D
Default

The original script ran for me but did not launch Guild Wars at the end of it. I could watch TexMod come up and it looked as though it was filling everything in but it did happen very fast. Tried 3 or 4 times and never did get GW to launch.

I changed all of the "sleep (100)" to "sleep (1000)" and now the whole thing works flawlessly although substantially slower. I'll experiment later on how low I can get on the sleep timer before it stops working.
wajj is offline   Reply With Quote
Old Dec 11, 2008, 02:45 PM // 14:45   #6
Furnace Stoker
 
Mordiego's Avatar
 
Join Date: Sep 2007
Location: Poznań, UTC+1
Guild: We Are From Poland [Pol]
Profession: N/A
Default

what should I input and where if I want to run another (or 2-3 more) package along with the first one?
Sry if that's a stupid question :P

Last edited by Mordiego; Dec 11, 2008 at 02:57 PM // 14:57..
Mordiego is offline   Reply With Quote
Old Dec 12, 2008, 12:59 AM // 00:59   #7
Furnace Stoker
 
MisterB's Avatar
 
Join Date: Oct 2005
Location: Planet Earth, Sol system, Milky Way galaxy
Guild: [ban]
Profession: W/
Default

Quote:
Originally Posted by Mordiego View Post
what should I input and where if I want to run another (or 2-3 more) package along with the first one?
Sry if that's a stupid question :P
Repeat this section of the sample script:
Code:
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(100)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\program files\Guild Wars\Tyria - EotN Cartography Made Easy.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
By repeat, I mean just copy the above directly after they are listed in the sample and before the last two lines of code. You may have to insert delays.
MisterB is offline   Reply With Quote
Old Dec 12, 2008, 10:10 AM // 10:10   #8
Furnace Stoker
 
Mordiego's Avatar
 
Join Date: Sep 2007
Location: Poznań, UTC+1
Guild: We Are From Poland [Pol]
Profession: N/A
Default

Code:
ShellExecute("C:\Games\Guild Wars\TexMod.exe") ;TexMod path
Do
	sleep(100)
Until (WinExists("TexMod"))
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:2]")
Do
	sleep(100)
Until (WinExists("Select Executable"))
ControlSetText("Select Executable", "","[CLASS:Edit; INSTANCE:1]","C:\Games\Guild Wars\Gw.exe") ;Gw.exe path
ControlClick("Select Executable", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(100)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\Games\Guild Wars\Texmod\dark glass.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(100)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\Games\Guild Wars\Texmod\adrenaline.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(100)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\Games\Guild Wars\Texmod\blood.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(100)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\Games\Guild Wars\Texmod\white_para_wings.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")

ControlClick("TexMod", "","[CLASS:Button; INSTANCE:11]")
WinClose("TexMod")
Something like that? It doesn't seem to work for me. Hope I didn't mess anything up

Last edited by Mordiego; Dec 12, 2008 at 01:10 PM // 13:10..
Mordiego is offline   Reply With Quote
Old Dec 12, 2008, 10:26 AM // 10:26   #9
Furnace Stoker
 
MisterB's Avatar
 
Join Date: Oct 2005
Location: Planet Earth, Sol system, Milky Way galaxy
Guild: [ban]
Profession: W/
Default

Quote:
Originally Posted by Mordiego View Post
Something like that? It doesn't seem to work for me. Hope I didn't mess anything up
First problem I see with your script is formatting. You need to start each line with a command. You used the "QUOTE" tag instead of "CODE," so I'm not really sure if your script is formatted that way or not. Word processor programs sometimes apply a character limit per line, which will result in incorrect code. In Notepad, that feature is called "word wrap," which you must disable.

It's best to use the script editor included with AutoIt.

edit: Scripts removed.

Last edited by MisterB; Dec 12, 2008 at 08:23 PM // 20:23..
MisterB is offline   Reply With Quote
Old Dec 12, 2008, 02:20 PM // 14:20   #10
Furnace Stoker
 
Mordiego's Avatar
 
Join Date: Sep 2007
Location: Poznań, UTC+1
Guild: We Are From Poland [Pol]
Profession: N/A
Default

I've changed the QUOTE to CODE casing in my previous post.
As for the new scripts I tried them both and both load a random ammount of packages ranging from 1 to 3 (they never load all 4 packages). Packages are also randomly picked. Sometimes it's "blood.tpf" only, sometimes "adrenaline.tpf" along with "white para wings.tpf", sometimes none of them, etc.
Both scripts seem to jam on picking up packages from the list of files since I noticed they don't close them in the end. When I removed the last line of the script I realised they leave around 2-3 open "select package file" windows after launching (unless that's intentional ). In the end I may be wrong since it's all rocket science for me.
PS. and ofc I'm using the script editor that came along with AutoIt , not the Notepad.
PS2. as for the speed- I don't care if it loads for 10seconds+. As long it saves me from countless clicking and selecting the desired packages- it's ok with me.

Last edited by Mordiego; Dec 12, 2008 at 02:33 PM // 14:33..
Mordiego is offline   Reply With Quote
Old Dec 12, 2008, 05:39 PM // 17:39   #11
Ascalonian Squire
 
Join Date: Sep 2007
Profession: Me/
Default

I had some problems running the script. I changed it a bit, maybe useful for someone.
Code:
;Start TexMod
ShellExecute("E:\Online\GUILD WARS\Texmod.exe")

;Wait for it to complete
Do
	sleep(100)
Until (WinExists("TexMod Beta Version v0.9b (c) RS"))

;Click the big folder
ControlClick("TexMod Beta Version v0.9b (c) RS", "","[CLASS:Button; INSTANCE:2]")

;Wait for the dropdown
Do
	sleep(100)
Until (WinExists("[CLASS:#32768]"))

;Click "Browse..."
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")

;Wait for file selection window
Do
	sleep(100)
Until (WinExists("Select Executable"))

;Better wait a moment...
Sleep(250)

;Select GW.exe
ControlSetText("Select Executable", "","[CLASS:Edit; INSTANCE:1]","E:\Online\GUILD WARS\Gw.exe") ;Gw.exe path
ControlClick("Select Executable", "","[CLASS:Button; INSTANCE:2]")

;Better wait a moment...
Sleep(250)

;Click the small folder
ControlClick("TexMod - GW.EXE", "","[CLASS:Button; INSTANCE:12]")

;Wait for the dropdown again
Do
	sleep(100)
Until (WinExists("[CLASS:#32768]"))

;And click on "Browse..." again
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")

;Wait for the select menu
Do
	sleep(100)
Until (WinExists("Select Texmod Packages to add."))

;Add the TPF and click "OK"
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","E:\Online\GUILD WARS\Glazed_Graphite_1.2.tpf")
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")

;Wait to return to TexMod window
Do
	Sleep(100)
Until (WinActive("TexMod - GW.EXE"))

;Click "Run" and exit
ControlClick("TexMod - GW.EXE", "","[CLASS:Button; INSTANCE:11]")
WinClose("TexMod - GW.EXE")
To add more packages replicate these lines:
Code:
;And click on "Browse..." again
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")

;Wait for the select menu
Do
	sleep(100)
Until (WinExists("Select Texmod Packages to add."))

;Add the TPF and click "OK"
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","E:\Online\GUILD WARS\Glazed_Graphite_1.2.tpf")
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")

;Wait to return to TexMod window
Do
	Sleep(100)
Until (WinActive("TexMod - GW.EXE"))
Cronkk is offline   Reply With Quote
Old Dec 13, 2008, 08:43 AM // 08:43   #12
Furnace Stoker
 
Mordiego's Avatar
 
Join Date: Sep 2007
Location: Poznań, UTC+1
Guild: We Are From Poland [Pol]
Profession: N/A
Default

still.... none of the provided scripts works with more than one package.
Mordiego is offline   Reply With Quote
Old Dec 17, 2008, 03:14 AM // 03:14   #13
Ascalonian Squire
 
Join Date: Aug 2008
Default

Lurk, Lurk...
Hey guys! First post! :O
So here's what I did do get around the issues of autoit not loading more than 1 package

Code:
Do
	sleep(750)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
Do
	sleep(750)
Until (WinExists("Select Texmod Packages to add."))
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\program files\Guild Wars\*.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
from traversc's original script, insert this between
Code:
Do
	sleep(100)
Until (WinExists("Select Executable"))
ControlSetText("Select Executable", "","[CLASS:Edit; INSTANCE:1]","C:\program files\Guild Wars\Gw.exe") ;Gw.exe path
ControlClick("Select Executable", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
and

Code:
Do
	sleep(100)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
Also if you haven't already put a sleep command between
Code:
ControlSend("[CLASS:#32768]","","","{ENTER}")
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\program files\Guild Wars\*.tpf") ;tpf path
Then change the .tpf files to your liking. I hope I was clear enough and that it helps.
zannen0 is offline   Reply With Quote
Old Dec 20, 2008, 04:17 PM // 16:17   #14
Furnace Stoker
 
Mordiego's Avatar
 
Join Date: Sep 2007
Location: Poznań, UTC+1
Guild: We Are From Poland [Pol]
Profession: N/A
Default

Quote:
Originally Posted by zannen0 View Post
...First post! :O...
First post and U saved the day! It works brilliantly. Loads all 5 packages at all times!!! Thank you very much

For future: this how it looks for me after applying to your suggestion:
Code:
ShellExecute("C:\Guild Wars\TexMod.exe") ;TexMod path
Do
	sleep(100)
Until (WinExists("TexMod"))
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:2]")
Do
	sleep(100)
Until (WinExists("Select Executable"))
ControlSetText("Select Executable", "","[CLASS:Edit; INSTANCE:1]","C:\Guild Wars\Gw.exe") ;Gw.exe path
ControlClick("Select Executable", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(750)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
Do
	sleep(750)
Until (WinExists("Select Texmod Packages to add."))
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\Guild Wars\*.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(750)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
Do
	sleep(750)
Until (WinExists("Select Texmod Packages to add."))
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\Guild Wars\*.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(750)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
Do
	sleep(750)
Until (WinExists("Select Texmod Packages to add."))
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\Guild Wars\*.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(750)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
Do
	sleep(750)
Until (WinExists("Select Texmod Packages to add."))
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\Guild Wars\*.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(750)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
Do
	sleep(750)
Until (WinExists("Select Texmod Packages to add."))
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\Guild Wars\*.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(750)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
Do
	sleep(750)
Until (WinExists("Select Texmod Packages to add."))
ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\Guild Wars\*.tpf") ;tpf path
ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
Do
	sleep(100)
Until (WinExists("[CLASS:#32768]"))
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")
ControlClick("TexMod", "","[CLASS:Button; INSTANCE:11]")
WinClose("TexMod")
Thnx everyone for contribution.

Last edited by Mordiego; Dec 20, 2008 at 04:29 PM // 16:29..
Mordiego is offline   Reply With Quote
Old Dec 21, 2008, 11:49 AM // 11:49   #15
Ascalonian Squire
 
Join Date: Aug 2008
Default Condensed

So, playing around with the code, I simplified it by making a while loop and condensed it a bit. Here's what I did.
Code:
ShellExecute("C:\program files\Guild Wars\TexMod.exe") ;TexMod path

Do
	sleep(600)
Until (WinExists("TexMod"))

ControlClick("TexMod", "","[CLASS:Button; INSTANCE:2]")
ControlSend("[CLASS:#32768]","","","{DOWN}")
ControlSend("[CLASS:#32768]","","","{ENTER}")

Do
	sleep(600)
Until (WinExists("Select Executable"))
ControlSetText("Select Executable", "","[CLASS:Edit; INSTANCE:1]","C:\program files\Guild Wars\Gw.exe") ;Gw.exe path
ControlClick("Select Executable", "","[CLASS:Button; INSTANCE:2]")
$c = 0
while $c <= *
	ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")

	Do
		sleep(600)
	Until (WinExists("[CLASS:#32768]"))
	ControlSend("[CLASS:#32768]","","","{DOWN}")
	ControlSend("[CLASS:#32768]","","","{ENTER}")

	Do
		sleep(600)
	Until (WinExists("Select Texmod Packages to add."))
		Select
			Case $c = 0
				ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\program files\Guild Wars\#.tpf") ;tpf path
			Case $c = 1
				ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\program files\Guild Wars\#.tpf") ;tpf path

. . .

			Case $c = *
				ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]","C:\program files\Guild Wars\#.tpf") ;tpf path
		EndSelect

	ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:2]")
	$c = $c + 1
WEnd	

ControlClick("TexMod", "","[CLASS:Button; INSTANCE:11]")
As you can see I removed the duplicate lines and made it so you can get to the mods you want easier. Just change the * to the number of packets you want, and then the # to the .tpf files you want. Enjoy!
zannen0 is offline   Reply With Quote
Old Dec 31, 2008, 04:44 PM // 16:44   #16
Furnace Stoker
 
Mordiego's Avatar
 
Join Date: Sep 2007
Location: Poznań, UTC+1
Guild: We Are From Poland [Pol]
Profession: N/A
Default

I'v tested it, zannen0. The last script never fails to run in opposition to the previous version that used to fail from time to time. Yet again- many thnx man.
Mordiego is offline   Reply With Quote
Old Dec 31, 2008, 06:48 PM // 18:48   #17
Krytan Explorer
 
Empress Amarox's Avatar
 
Join Date: Dec 2008
Location: Above you.
Profession: Mo/W
Default

How would I modify the above script to have it auto fill in my password for me like the -password shortcut tag does?

Last edited by Empress Amarox; Dec 31, 2008 at 07:09 PM // 19:09..
Empress Amarox is offline   Reply With Quote
Old Jan 03, 2009, 04:05 AM // 04:05   #18
Ascalonian Squire
 
Join Date: Aug 2008
Default Code, Code

Quote:
Originally Posted by Empress Amarox View Post
How would I modify the above script to have it auto fill in my password for me like the -password shortcut tag does?
Funny you should ask that; I've been working on that ever since I got the mods to load. I've got it to work flawlessly and I am now trying to make it a universal setup, where you can just edit an .ini file and it will auto fillout everything for you.

So I'll go ahead and give what I have for my autoit script; just place it after your "open guild wars" line, after a short sleep/wait.

First you'll want to make an .ini file with the following
Code:
[User]
account="account"
password="password"
Save it somewhere and note the name and location, as you'll need it. I put mine in a folder on the desktop along with my other .ini file and scripts. I think it's simple but I'll say it anyway; replace "account" with your account name and replace "password" with your password. If you wish, you can even omit the entire account line as that is meant only for people who either have more than one account.

Next will be the autoit code:
Code:
AutoItSetOption("SendKeyDelay", 75)
Send("{TAB}")
$Name = IniRead("...User.ini", "User", "account", "NotFound")
Send($Name)
Sleep(75)
Send("{Tab}")
Sleep(75)
$Pass = IniRead("...User.ini", "User", "password", "NotFound")
Send($Pass)
Send("{ENTER}")
I worry about ANet complaining about us using an autoit script to login us in, so I put in the
Code:
AutoItSetOption("SendKeyDelay", 75)
to make the sending of the text more natural and realistic. Whether or not this works is personal preference, so if you don't care, you can just take it out. I think it's simple but I'll say it anyway; replace "...User.ini" with the location and file name of your .ini file. Again, as before, If you only use one account, you take out
Code:
$Name = IniRead("...User.ini", "User", "account", "NotFound")
Send($Name)
Sleep(75)
I'm currently trying to work in a "Not Found" message box for if you did not put in any information for you .ini file(s).

Finally, the variables I used are not set in stone. You can use whatever you want, just make sure if you change something you change all instances of it or autoit will return errors.

If you guys want my current full script, along with the .ini file(s), let me know and I'll post them. I'm constantly messing with it trying to make it as polished as possible. Also if you guys want, post requests or suggestions and I'll see what I can come up with. =Þ

Programing is so much fun!!
zannen0 is offline   Reply With Quote
Old Apr 25, 2010, 11:56 PM // 23:56   #19
Ascalonian Squire
 
Join Date: Aug 2008
Default Updated Script

Just a quick disclaimer: This was made and tested on a 64-bit windows 7 machine, so a lot of things might not work for you. Make a forum post or send me a pm and I'll try to help you with any problems you may have

Well, here goes.

First, make a new folder, call it "Guild Wars Multi-Launcher", and then copy and paste the following script into autoit and save it to your new folder:

Code:
#Include <string.au3>

Opt("WinWaitDelay",750)

Dim $IniFile = "\Guild Wars Multi-Launcher.ini"
Dim $Sections = IniReadSectionNames(@ScriptDir & $IniFile)
Dim $Texmod = IniRead(@ScriptDir & $IniFile, $Sections[1], "texmod", "")
Dim $ModsLoad = IniReadSection(@ScriptDir & $IniFile, $Sections[2])
Dim $ClientPaths[3], $LoadClient[3], $LoadUser[3], $LoadLogin[3][3]
Dim $GamesX, $ClientsX, $UsersX, $ModsX ;varriables for counting
Dim $Games = 3, $Clients = 3, $Users = 3, $Mods = $ModsLoad[0][0] ;max counter variables

For $ClientsX = 0 To $Clients - 1
	$ClientPaths[$ClientsX] = IniRead(@ScriptDir & $IniFile, $Sections[3], "gw" & $ClientsX, "")
Next

For $GamesX = 0 To $Games - 1
	$LoadClient[$GamesX] = IniRead(@ScriptDir & $IniFile, "Guild Wars" & $GamesX, "client", "")
Next

For $UsersX = 0 To $Users - 1
	$LoadUser[$UsersX] = IniRead(@ScriptDir & $IniFile, "Guild Wars" & $UsersX, "account", "")
	$LoadLogin[$UsersX][0] = IniRead(@ScriptDir & $IniFile, "User" & $UsersX, "account", "")
	$LoadLogin[$UsersX][1] = IniRead(@ScriptDir & $IniFile, "User" & $UsersX, "password", "")
	$LoadLogin[$UsersX][2] = IniRead(@ScriptDir & $IniFile, "User" & $UsersX, "character", "")
Next

For $GamesX = 0 To $Games - 1
	If IniRead(@ScriptDir & $IniFile, "Guild Wars" & $GamesX, "load", "") = 1 Then
		ShellExecute($ClientPaths[$GamesX], "-image")
		WinSetTitle("[CLASS:ArenaNet_Dx_Window_Class; INSTANCE:1]","","Guild Wars Update-" & $GamesX)
		Sleep(1000)
		WinWaitClose("[CLASS:ArenaNet_Dx_Window_Class; INSTANCE:1]")
	EndIf
Next

If WinExists("TexMod")=0 Then 
	ShellExecute($Texmod) ;TexMod path 
	WinWait("TexMod", "") 	
	sleep(750)
Else
	WinActivate("TexMod")
EndIf

For $ModsX = 0 To $Mods - 1
	ControlClick("TexMod", "","[CLASS:Button; INSTANCE:12]")
	WinWait("[CLASS:#32770]", "" ,1000)
	ControlSend("[CLASS:#32768]","","","{DOWN}")
	ControlSend("[CLASS:#32768]","","","{ENTER}")
	WinWait("Select Texmod Packages to add.", "" ,1000)
	ControlSetText("Select Texmod Packages to add.", "","[CLASS:Edit; INSTANCE:1]", IniRead(@ScriptDir & $IniFile, $Sections[2], "mod" & $ModsX+1, ""))
	ControlClick("Select Texmod Packages to add.", "","[CLASS:Button; INSTANCE:1]")
Next

For $GamesX = 0 to $Games - 1
	If IniRead(@ScriptDir & $IniFile, "Guild Wars" & $GamesX, "load", "") = 1 Then
		For $ClientsX = 0 To $Clients - 1
			If StringCompare($LoadClient[$GamesX], "Client " & $ClientsX) = 0 Then
				WinActivate("TexMod")
				ControlClick("TexMod", "","[CLASS:Button; INSTANCE:2]")
				ControlSend("[CLASS:#32768]","","","{DOWN}")
				ControlSend("[CLASS:#32768]","","","{ENTER}")
				WinWait("Select Executable", "" ,750)
				ControlSetText("Select Executable", "","[CLASS:Edit; INSTANCE:1]", $ClientPaths[$ClientsX])
				ControlClick("Select Executable", "","[CLASS:Button; INSTANCE:2]")
				ControlClick("TexMod", "","[CLASS:Button; INSTANCE:11]")
			EndIf
			Sleep(2500)
		Next
	EndIf
	WinSetTitle("[CLASS:ArenaNet_Dx_Window_Class; INSTANCE:1]","","Guild Wars-" & $GamesX)

	If IniRead(@ScriptDir & $IniFile, "Guild Wars" & $GamesX, "autologin", "") = 1 Then
		For $UsersX = 0 to $Users - 1
			If StringCompare($LoadUser[$GamesX], "User " & $UsersX) = 0 Then
				AutoItSetOption("SendKeyDelay",50)
				WinActivate("[CLASS:ArenaNet_Dx_Window_Class; INSTANCE:1]")
				WinWaitActive("[CLASS:ArenaNet_Dx_Window_Class; INSTANCE:1]")
				Sleep("2500")
				Send("{SHIFTDOWN}+{TAB}")
				Send("{SHIFTUP}")
				Sleep(150)
				Send($LoadLogin[$UsersX][0])
				Sleep(150)
				Send("{Tab}")
				Sleep(150)
				Send($LoadLogin[$UsersX][1])
				Sleep(150)
				Send("{Tab}")
				Sleep(150)
				Send($LoadLogin[$UsersX][2])
				Send("{ENTER}")
			EndIf
			Sleep(2500)
		Next
	EndIf
Next
Next, open a text editor such as notepad++ and copy paste the following and save it as "Guild Wars Multi-Launcher.ini" to the same folder as the script:

Code:
[Program Locations]
gwml=C:\Program Files (x86)\Guild Wars\Mod\MGWML.exe

[Mods]
mod1=C:\Program Files (x86)\Guild Wars\Mod\nofog.tpf

[Client Paths]
gw0=C:\Program Files (x86)\Guild Wars\Gw.exe

[User0]
[email protected]
password=blah
character=Blah blah

[Guild Wars0]
load=1
client=Client 0
autologin=1
account=User 0
Remember that you're going to have to change these values to fit your situation. To add more mods, add

Code:
mod2=C:\Program Files (x86)\Guild Wars\Mod\clearskillsv13.tpf
mod3...
Make forum posts if you need help. I'd perfer it to pm as I can help more then one person.

Last edited by zannen0; Apr 26, 2010 at 01:18 AM // 01:18.. Reason: changed .ini
zannen0 is offline   Reply With Quote
Old Apr 26, 2010, 01:05 AM // 01:05   #20
Frost Gate Guardian
 
Join Date: Jan 2009
Guild: Forgotten Exiles [EXIA]
Profession: A/
Default

Thanks for the updated script Genius

Last edited by Katsura; Apr 26, 2010 at 02:04 AM // 02:04.. Reason: Mainly my own stupidty. Fixed the code to be right and it all worked :)
Katsura is offline   Reply With Quote
Reply

Share This Forum!  
 
 
           

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New script and voice-over for Factions arsie Sardelac Sanitarium 12 Aug 21, 2007 02:40 AM // 02:40
WTS: Perfect SEPHIS Axe REQ9 +5eng oldschool no script Eragon Selene Sell 5 Jun 20, 2007 01:01 PM // 13:01
ronronron Technician's Corner 8 Aug 07, 2006 04:43 PM // 16:43


All times are GMT. The time now is 01:23 PM // 13:23.


Powered by: vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
jQuery(document).ready(checkAds()); function checkAds(){if (document.getElementById('adsense')!=undefined){document.write("_gaq.push(['_trackEvent', 'Adblock', 'Unblocked', 'false',,true]);");}else{document.write("