chrisrulz Posted January 7, 2010 Share Posted January 7, 2010 heyy ive got a script and imm getting a error Case $Update Licence Case $Update Licence^ERROR Error: missing Seprator Character After Keyword. please help.. ,chris Link to comment Share on other sites More sharing options...
99ojo Posted January 7, 2010 Share Posted January 7, 2010 Hi, looking at your messy Case snippet my glasbowl says: Case $UpdateLicence or Case $Update = "Licence" depending of your variable definition or what you want. You may post more code. ;-)) Stefan Link to comment Share on other sites More sharing options...
chrisrulz Posted January 7, 2010 Author Share Posted January 7, 2010 Here u go While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Update Licence _myfunc () EndSwitch WEnd Link to comment Share on other sites More sharing options...
GEOSoft Posted January 7, 2010 Share Posted January 7, 2010 (edited) Here u goWhile 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Update Licence _myfunc () EndSwitchWEndOh how wrong you are.Case $Update Licence--------------------^ Error.Any clue yet? Edited January 7, 2010 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
chrisrulz Posted January 7, 2010 Author Share Posted January 7, 2010 no please tell me? Link to comment Share on other sites More sharing options...
99ojo Posted January 7, 2010 Share Posted January 7, 2010 (edited) Hi,my glasbowl told me, that you might have a button:Case $UpdateLicence ($UpdateLicence = GUICtrlCreateButton...) ???Otherwise you have to post your gui code as well for further assistence....;-))Stefan Edited January 7, 2010 by 99ojo Link to comment Share on other sites More sharing options...
GEOSoft Posted January 7, 2010 Share Posted January 7, 2010 (edited) Okay I'll tip you off. Assuming Local is a string that is returned in some variable which could have other values. $sStr = "Local" Switch $sStr Case "Local" ;; do something Case "National" ;; do something different EndSwitch If you want 1 action to be taken on multiple values then separate them with a comma. $sStr = "Global" Switch $sStr Case "Local", "Global" ;; do something Case "National" ;; do something different EndSwitch To do it in a Select statement it would be $sStr = "Local" Select Case $sStr = "Local" ;; do something Case $sStr = "National" ;; do something different EndSelect Edited January 7, 2010 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
chrisrulz Posted January 7, 2010 Author Share Posted January 7, 2010 is this wat u lookin for $Licence = GUICtrlCreateButton("Update Licence", 496, 312, 113, 49, $WS_GROUP) Link to comment Share on other sites More sharing options...
99ojo Posted January 7, 2010 Share Posted January 7, 2010 (edited) Hi, as i guessed a wrong $msg definition: Case $Licence should work. You have to reference the controlid, not the text of the button. See helpfile for more information. ;-)) Stefan Edited January 7, 2010 by 99ojo Link to comment Share on other sites More sharing options...
GEOSoft Posted January 7, 2010 Share Posted January 7, 2010 (edited) A simple look at the code on your machine shows that you are trying to see how you detect a button click #include<GuiConstants.au3> $Frm = GUICreate("Test Form") $Licence = GUICtrlCreateButton("Update Licence", 496, 312, 113, 49, $WS_GROUP) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EventClose Exit Case $License ;; Call a function or perform some code magic here EndSwitch WEnd There are many, many examples of using the Switch statement in a message loop. The biggest problem you will face is opening the help file and looking at almost any of the GUI examples. Edited January 7, 2010 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
chrisrulz Posted January 7, 2010 Author Share Posted January 7, 2010 heyy in this script that ive got it has this expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\documents and settings\admin\my documents\autoit\koda_1.7.2.0\nittohackz.kxf $Nittohackz = GUICreate("Nittohackz", 618, 366, 186, 117, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_OVERLAPPEDWINDOW,$WS_TILEDWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS)) GUISetCursor (2) GUISetFont(88, 400, 0, "MS Sans Serif") GUISetBkColor(0x808080) $Title = GUICtrlCreateLabel("Build ID 421586485", 0, 0, 145, 24, $WS_BORDER) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xFF0000) $Label1 = GUICtrlCreateLabel("Username", 160, 136, 91, 28) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") GUICtrlCreateInput("", 256, 144, 129, 32, BitOR($ES_CENTER,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE)) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("Password", 160, 184, 86, 28) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $Input1 = GUICtrlCreateInput("", 256, 184, 129, 32, BitOR($ES_CENTER,$ES_PASSWORD,$ES_AUTOHSCROLL,$WS_BORDER)) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $Login = GUICtrlCreateButton("Login", 392, 160, 73, 33, BitOR($BS_CENTER,$WS_GROUP)) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $Save = GUICtrlCreateRadio("Automatic Login (Nitto Account", 136, 96, 273, 41) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Nitto = GUICtrlCreateCombo("What Car", 496, 64, 105, 25) GUICtrlSetData(-1, "Integra GSR|Civic|") GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Licence = GUICtrlCreateButton("Licence", 496, 312, 113, 49, $WS_GROUP) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Dial = GUICtrlCreateInput("", 520, 96, 97, 28) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label3 = GUICtrlCreateLabel("Dial in", 464, 96, 54, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Label4 = GUICtrlCreateLabel("Clutch Pos", 416, 120, 90, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Back = GUICtrlCreateCombo("Back", 512, 120, 89, 25) GUICtrlSetData(-1, "Back|Middle|Front|Half Back|Half Front") GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Login _myfunc () EndSwitch WEnd Func _myfunc () Run("C:\Program Files\Nitto 1320 Legends\NittoLegendsBeta.exe") WinWaitActive("Nitto Legends (Beta)") sleep(4000) Mousemove(842, 496, 5000) MouseClick("Left", 842, 496, 1) Send("zammyyy") Mousemove(847, 540, 5000) MouseClick("Left", 847, 540, 1) Send("lucky66") Mousemove(1152, 506, 5000) MouseClick("Left", 1152, 506, 1) EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Licence _myfuncc () EndSwitch WEnd Func _myfuncc () Run("C:\Documents and Settings\Admin\Desktop\Licence.exe") EndFunc NOW when i press the licence button nothing happends please help...? Link to comment Share on other sites More sharing options...
99ojo Posted January 7, 2010 Share Posted January 7, 2010 (edited) Hi, this is because your second while loop isn't reach for ever. 1) Put the Case $Licence _myfuncc () part from the second while into the 1st while loop. 2) Delete your second while loop. ;-)) Stefan <Edit>: Change 1) and 2) Edited January 7, 2010 by 99ojo Link to comment Share on other sites More sharing options...
GEOSoft Posted January 7, 2010 Share Posted January 7, 2010 any GUI messages that you want to intercept have to go in the message loop and you do not use more than one message loop. Just keep adding Case statements for each control you expect a message from. While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Login _myfunc () Case $Licence _myfuncc () EndSwitch WEnd George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
chrisrulz Posted January 7, 2010 Author Share Posted January 7, 2010 heyy soz imm not the best with this program could u jst edit my script that i showe u before and post it so i can copy it thx.. Link to comment Share on other sites More sharing options...
99ojo Posted January 7, 2010 Share Posted January 7, 2010 Hi, Lazy.... expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\documents and settings\admin\my documents\autoit\koda_1.7.2.0\nittohackz.kxf $Nittohackz = GUICreate("Nittohackz", 618, 366, 186, 117, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_OVERLAPPEDWINDOW,$WS_TILEDWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS)) GUISetCursor (2) GUISetFont(88, 400, 0, "MS Sans Serif") GUISetBkColor(0x808080) $Title = GUICtrlCreateLabel("Build ID 421586485", 0, 0, 145, 24, $WS_BORDER) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetBkColor(-1, 0xFF0000) $Label1 = GUICtrlCreateLabel("Username", 160, 136, 91, 28) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") GUICtrlCreateInput("", 256, 144, 129, 32, BitOR($ES_CENTER,$WS_BORDER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE)) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("Password", 160, 184, 86, 28) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $Input1 = GUICtrlCreateInput("", 256, 184, 129, 32, BitOR($ES_CENTER,$ES_PASSWORD,$ES_AUTOHSCROLL,$WS_BORDER)) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $Login = GUICtrlCreateButton("Login", 392, 160, 73, 33, BitOR($BS_CENTER,$WS_GROUP)) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $Save = GUICtrlCreateRadio("Automatic Login (Nitto Account", 136, 96, 273, 41) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Nitto = GUICtrlCreateCombo("What Car", 496, 64, 105, 25) GUICtrlSetData(-1, "Integra GSR|Civic|") GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Licence = GUICtrlCreateButton("Licence", 496, 312, 113, 49, $WS_GROUP) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Dial = GUICtrlCreateInput("", 520, 96, 97, 28) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Label3 = GUICtrlCreateLabel("Dial in", 464, 96, 54, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Label4 = GUICtrlCreateLabel("Clutch Pos", 416, 120, 90, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Back = GUICtrlCreateCombo("Back", 512, 120, 89, 25) GUICtrlSetData(-1, "Back|Middle|Front|Half Back|Half Front") GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Login _myfunc () Case $Licence _myfuncc () EndSwitch WEnd Func _myfunc () Run("C:\Program Files\Nitto 1320 Legends\NittoLegendsBeta.exe") WinWaitActive("Nitto Legends (Beta)") sleep(4000) Mousemove(842, 496, 5000) MouseClick("Left", 842, 496, 1) Send("zammyyy") Mousemove(847, 540, 5000) MouseClick("Left", 847, 540, 1) Send("lucky66") Mousemove(1152, 506, 5000) MouseClick("Left", 1152, 506, 1) EndFunc Func _myfuncc () Run("C:\Documents and Settings\Admin\Desktop\Licence.exe") EndFunc Link to comment Share on other sites More sharing options...
chrisrulz Posted January 7, 2010 Author Share Posted January 7, 2010 OMG OMG OMG OMG IT WORKS THX MAN UR A LEGEND ALL OF U THAT HELPED THANK YOU SO MUCH.... now ive got the license setup i want to add licence numbers so it checks if its the right license key or invaild...? thank u so much.. Link to comment Share on other sites More sharing options...
99ojo Posted January 7, 2010 Share Posted January 7, 2010 Hi, you hopefully catch the difference between the scripts and understand the logic. ;-)) Stefan Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now