autoload TexMod (autoIt script)

AtomicMew

AtomicMew

Jungle Guide

Join Date: Apr 2005

N/A

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.

MisterB

MisterB

Furnace Stoker

Join Date: Oct 2005

Planet Earth, Sol system, Milky Way galaxy

[ban]

W/

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.

AtomicMew

AtomicMew

Jungle Guide

Join Date: Apr 2005

N/A

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.

MisterB

MisterB

Furnace Stoker

Join Date: Oct 2005

Planet Earth, Sol system, Milky Way galaxy

[ban]

W/

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.

wajj

Ascalonian Squire

Join Date: Oct 2005

Rangers of Ascalon Return [ROAR]

N/D

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.

Mordiego

Mordiego

Furnace Stoker

Join Date: Sep 2007

Pozna??, UTC+1

We Are From Poland [Pol]

N/A

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

MisterB

MisterB

Furnace Stoker

Join Date: Oct 2005

Planet Earth, Sol system, Milky Way galaxy

[ban]

W/

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.

Mordiego

Mordiego

Furnace Stoker

Join Date: Sep 2007

Pozna??, UTC+1

We Are From Poland [Pol]

N/A

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

MisterB

MisterB

Furnace Stoker

Join Date: Oct 2005

Planet Earth, Sol system, Milky Way galaxy

[ban]

W/

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.

Mordiego

Mordiego

Furnace Stoker

Join Date: Sep 2007

Pozna??, UTC+1

We Are From Poland [Pol]

N/A

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.

Cronkk

Ascalonian Squire

Join Date: Sep 2007

Me/

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"))

Mordiego

Mordiego

Furnace Stoker

Join Date: Sep 2007

Pozna??, UTC+1

We Are From Poland [Pol]

N/A

still.... none of the provided scripts works with more than one package.

zannen0

Ascalonian Squire

Join Date: Aug 2008

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.

Mordiego

Mordiego

Furnace Stoker

Join Date: Sep 2007

Pozna??, UTC+1

We Are From Poland [Pol]

N/A

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.

zannen0

Ascalonian Squire

Join Date: Aug 2008

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!

Mordiego

Mordiego

Furnace Stoker

Join Date: Sep 2007

Pozna??, UTC+1

We Are From Poland [Pol]

N/A

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.

Empress Amarox

Empress Amarox

Krytan Explorer

Join Date: Dec 2008

Above you.

Mo/W

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

zannen0

Ascalonian Squire

Join Date: Aug 2008

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

Ascalonian Squire

Join Date: Aug 2008

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.

Katsura

Frost Gate Guardian

Join Date: Jan 2009

Forgotten Exiles [EXIA]

A/

Thanks for the updated script Genius

zannen0

Ascalonian Squire

Join Date: Aug 2008

Updated my other post to be a bit more clear.

Katsura

Frost Gate Guardian

Join Date: Jan 2009

Forgotten Exiles [EXIA]

A/

What about a silent execution? Basically just with no visible actions? I know sometimes you can switch windows and it'll cause a slight mess-up

stretchs

stretchs

Jungle Guide

Join Date: Sep 2007

Untimely Demise [Err了] - SOHK

a silent mode, or even just a minimize would be great as long as it still operated, just looks nicer of course =]

KairuByte

Ascalonian Squire

Join Date: Aug 2007

The Sanctum Of Inner Darkness

N/

How would everyone feel about a script that:

First: Runs gw.exe -image (to download all available updates)
Second: Starts TexMod and loads predefined packages then launches (Silently!)
Three: Waits for GW to load and then runs KSMod.
Four: Inputs login data.

I assume KSMod can still patch GW in memory.

All optional of course.

Doug4130

Ascalonian Squire

Join Date: Feb 2011

D/

I'd use it, 12 characters..

paranon

paranon

Site Contributor

Join Date: Aug 2006

UK

[Zraw]

Mo/

surely for autofilling password in gw it would be easier to just type Send("password") rather than creating a different file to store account data, i dont use texmod regularly so this is the only part of this i am using.

Lithril Ashwalker

Lithril Ashwalker

Jungle Guide

Join Date: Dec 2008

Alabama

A/

im sure using auto it would get you banned considering its a script and bots use scripts...

MisterB

MisterB

Furnace Stoker

Join Date: Oct 2005

Planet Earth, Sol system, Milky Way galaxy

[ban]

W/

Quote:
Originally Posted by Lithril Ashwalker View Post
im sure using auto it would get you banned considering its a script and bots use scripts...
I am sure you are incorrect. Yes, this is a script that provides automation, but it terminates as soon as GW launches. AutoIt can surely be used to break the rules, but nothing in this thread does that.

Speeder

Speeder

Ascalonian Squire

Join Date: Aug 2005

R/

Hello everyone,

I've created such a program a while ago and I came across this thread and thought I should release it to you.
You may download it from here. This is an exe, you don't need to know AutoIt to use this.

You need to put AutoTexmod into a folder where you can write to (so it can save its configuration). Run it and configure it according to the messages written into the window titlebars. To redo the configuration, delete the ini file created next to the program (or for advanced users, edit it).
When there is a game update, the mods will not apply because GW restarts itself. Please rerun AutoTexmod then.

To prove I didn't make some kind of virus / keylogger, I've also uploaded the source code, which is attached to my post. Please don't misuse it.

TiagoS1

TiagoS1

Frost Gate Guardian

Join Date: Nov 2009

Quote:
Originally Posted by Speeder View Post
Hello everyone,

I've created such a program a while ago and I came across this thread and thought I should release it to you.
You may download it from here. This is an exe, you don't need to know AutoIt to use this.

You need to put AutoTexmod into a folder where you can write to (so it can save its configuration). Run it and configure it according to the messages written into the window titlebars. To redo the configuration, delete the ini file created next to the program (or for advanced users, edit it).
When there is a game update, the mods will not apply because GW restarts itself. Please rerun AutoTexmod then.

To prove I didn't make some kind of virus / keylogger, I've also uploaded the source code, which is attached to my post. Please don't misuse it.
Ok, so i used it. I don't understand nothing of autoIT script but i really wanted autoload texmod so i tried your stuff.

Works nicely with one exception. With the change of UI there are some graphical issues.For example, ive been doing SoOsc a lot, and when inside the dungeon, nothing happens. But when in arbor bay, lots of (black, grey?)squares appear perpendicular to ground. This DOES NOT HAPPEN when i use the textmod alone without autoload.

Any tips?

Shy Guy

Shy Guy

Wilds Pathfinder

Join Date: Sep 2009

...

W/

this isn't working at all for me <|3

after i pick the app and texmod and the mods, it just reopens those windows to pick the application and mods once i double click on the autoload texmod, then i have to forcibly close it.

TiagoS1

TiagoS1

Frost Gate Guardian

Join Date: Nov 2009

Quote:
Originally Posted by Shy Guy View Post
this isn't working at all for me <|3

after i pick the app and texmod and the mods, it just reopens those windows to pick the application and mods once i double click on the autoload texmod, then i have to forcibly close it.
Mate, you should read better

When you open AutoTexmod press YES to create a new definition. Then choose TEXMOD, then GW, and then the MODS you want to apply. When done, make sure you press CANCEL to close that window. After that, everything should go well.

Shy Guy

Shy Guy

Wilds Pathfinder

Join Date: Sep 2009

...

W/

Code:
[Settings]
TexModPath=C:\Users\-----\Desktop\TexMod.exe
AppPath=C:\Program Files (x86)\Guild Wars\Gw.exe
[Mods]
Mod1=C:\Users\-----\Downloads\UI.tpf
Mod2=C:\Users\-----\Downloads\Carto.tpf
It tries to load up, but it doesn't. I've selected the texmod, app, and the mods, but the windows to choose them keep repopping up, and it tells me to forcibly close texmod.

I read it, trust me <3

Speeder

Speeder

Ascalonian Squire

Join Date: Aug 2005

R/

Hey there!

To TiagoS1:
TexMod sometimes has minor glitches in GW with or without the autoload script. If you minimize-restore GW, they often go away. If you disable post-processing effects then enable them in options, it also probably goes away. The larger mods you use, the bigger chance you'll be getting glitches, so my suggestion is to use the smallest/fewest mods at once, only those that you need. (This also makes loading time faster.)

To Shy Guy:
The problem appears to be that AutoTexmod was either unable to write it config file next to the .exe file. Please make sure to copy the .ini file it creates to the same directory as AutoTexmod. Even simpler, try copying AutoTexmod to a directory where it can write to.
If I understood wrong and this isn't your problem, please write a PM for me and try to explain what happens for you in a very detailed way.

TiagoS1

TiagoS1

Frost Gate Guardian

Join Date: Nov 2009

Quote:
Originally Posted by Speeder View Post
Hey there!

To TiagoS1:
TexMod sometimes has minor glitches in GW with or without the autoload script. If you minimize-restore GW, they often go away. If you disable post-processing effects then enable them in options, it also probably goes away. The larger mods you use, the bigger chance you'll be getting glitches, so my suggestion is to use the smallest/fewest mods at once, only those that you need. (This also makes loading time faster.)
Right, i am getting this glitches even if i am only using a UI enhancement mod. I believe i am giving up on texmod. Too much glitches ruin the game.

Speeder

Speeder

Ascalonian Squire

Join Date: Aug 2005

R/

Yes, Texmod tends to introduce errors when you're changing many texture pieces. I don't think it is a very good idea to use it to change the UI (since it's made up of a lot of smaller images) or the maps, they WILL introduce errors.
I use some armour mods and some smaller mods such as loot glitter removal, they rarely introduce any glitches and then a minimize-restore fixes it.

ilovecp

ilovecp

Academy Page

Join Date: Oct 2005

Plopville

R/Rt

Quote:
Originally Posted by Speeder View Post
Hello everyone,

I've created such a program a while ago and I came across this thread and thought I should release it to you.
You may download it from here. This is an exe, you don't need to know AutoIt to use this.

You need to put AutoTexmod into a folder where you can write to (so it can save its configuration). Run it and configure it according to the messages written into the window titlebars. To redo the configuration, delete the ini file created next to the program (or for advanced users, edit it).
When there is a game update, the mods will not apply because GW restarts itself. Please rerun AutoTexmod then.

To prove I didn't make some kind of virus / keylogger, I've also uploaded the source code, which is attached to my post. Please don't misuse it.
I was trying to use this and it was fine for a while, but now it seems the application is taking a little longer to start which causes the autotexmod to time-out and then i have to force-close it. is there anyway to increase the time-out period between the steps?

Speeder

Speeder

Ascalonian Squire

Join Date: Aug 2005

R/

I've checked the code and apparently I did add some timeouts.
If you get the error "Timeout: Texmod didn't open. Please restart AutoTexmod!" or "Timeout: A browse for file window didn't open. Please restart AutoTexmod!", increase the number at the top of the script file at "$nWinTimeout = 3".
If you get the error "Timeout: Texmod hasn't started the application. Would you like to forcibly close Texmod?", increase the number at the top of the script file at "$nAppTimeout = 5".

You'll need AutoIt to create the new exe file afterwards, but it should be easy to do.

If you get a different error or a freeze, please try to explain precisely what happens before it stops.

zannen0

Ascalonian Squire

Join Date: Aug 2008

Quote:
Originally Posted by KairuByte View Post
How would everyone feel about a script that:

First: Runs gw.exe -image (to download all available updates)
Second: Starts TexMod and loads predefined packages then launches (Silently!)
Three: Waits for GW to load and then runs KSMod.
Four: Inputs login data.

I assume KSMod can still patch GW in memory.

All optional of course.
Hmm... I haven't touched my script in a while, but it has a GUI now, and does everything listed except load KSMod, which I personally don't use.

Let me know if you're interested and I'll post an updated script.

sexus

sexus

Pre-Searing Cadet

Join Date: Oct 2011

well what i would be interested in,is something like an autoit script for single games

so i can launch texmod silently for lets say resident evil 4 and that it autoselects logging mode,starts up the game and then exits texmod once i exit re4



and the same for lets say devil may cry 4 just instead of the logging mode it selects the tpf files that you want.


itd be very much appreciated, thanks