Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

inputbox errorlevel help me


  • Please log in to reply
5 replies to this topic
rasmus393
  • Members
  • 8 posts
  • Last active: Mar 21 2015 09:29 PM
  • Joined: 18 Jul 2013
^!w::
inputbox, password, enter password, your input wil be hidden, hide 
if errorlevel 
{
run C:\Program Files (x86)\Warcraft III\Frozen Throne.exe
}
else
{
run C:\Program Files (x86)\Warcraft III\Frozen Throne.exe
winwait Warcraft III
if errorlevel 
msgbox did not work
else 
{
sleep 3500
sendinput b 
sleep 5500
sendinput %password%
sleep 50
send {enter}
sleep 1000
sendinput g 
}
}
i would use this script for running warcraft3 and make ahk enter mypassword 
my problem is that if i cancel the inputbox it still send the b and the password and think that it should only run the game.
plz help me 


Menixator
  • Members
  • 744 posts
  • Last active: Sep 01 2015 02:54 PM
  • Joined: 10 Jul 2013

Is this what you want?

^!w::
inputbox, password,Enter Password, Enter Password:`t(Input will be hidden), hide ,384,134
if (Errorlevel = 1)
	MsgBox Cancel was pressed.
else
{
	run C:\Program Files (x86)\Warcraft III\Frozen Throne.exe
	winwait Warcraft III
	If (Errorlevel = 1)
		MsgBox Winwait Timed Out.
	else
	{
	sleep 3500
	sendinput b 
	sleep 5500
	sendinput %password%
	sleep 50
	send {enter}
	sleep 1000
	sendinput g 
}
}
return

Edited by Menixator, 20 July 2013 - 10:15 AM.


rasmus393
  • Members
  • 8 posts
  • Last active: Mar 21 2015 09:29 PM
  • Joined: 18 Jul 2013

i have just tried your script and it didnot work it still does the same as if i had typed a password



Menixator
  • Members
  • 744 posts
  • Last active: Sep 01 2015 02:54 PM
  • Joined: 10 Jul 2013

I have edited the script a bit. Try it now.



rasmus393
  • Members
  • 8 posts
  • Last active: Mar 21 2015 09:29 PM
  • Joined: 18 Jul 2013

it still does not  work 



rasmus393
  • Members
  • 8 posts
  • Last active: Mar 21 2015 09:29 PM
  • Joined: 18 Jul 2013
Op