Kyme Posted June 28, 2008 Posted June 28, 2008 (edited) i have this script and i wana make it to be if Question = IniRead(@ScriptDir & "\data.dll", "Question", "1", "") then pass = IniRead(@ScriptDir & "\data.dll", "Word", "1", "") if Question = IniRead(@ScriptDir & "\data.dll", "Question", "2", "") then pass = IniRead(@ScriptDir & "\data.dll", "Word", "2", "") if Question = IniRead(@ScriptDir & "\data.dll", "Question", "3", "") then pass = IniRead(@ScriptDir & "\data.dll", "Word", "3", "") i think i explain good....i i have no ideas how to make this... pass() Func pass() Local $iTries = 4, $passwd $pass=IniRead(@ScriptDir & "\data.dll", "Word", "1", "") $Ques=iniRead(@ScriptDir & "\data.dll", "Question","1", "") While 1 $passwd = InputBox("Password", IniRead(@ScriptDir & "\data.dll", "Question", String(Random(1, 6, 1)), ""), "", "*") If $passwd = $pass then MsgBox(64, "Correct", "Corect") ExitLoop Else $iTries -= 1 If $iTries Then MsgBox(16, "Wrong", "Wrong! You have " & $iTries & " attempts left.") Else MsgBox(16, "Fuck you!", "Youre PC will Shut Down....") Exit EndIf EndIf WEnd EndFunc i try this but it's fail pass() Func pass() Local $iTries = 4, $passwd $random=String(Random(1, 6, 1)) $pass=IniRead(@ScriptDir & "\data.dll", "Word", "1", "") $Ques=iniRead(@ScriptDir & "\data.dll", "Question","1", "") While 1 ;~ InputBox("Password", IniRead(@ScriptDir & "\data.dll", "Question", String(Random(1, 6, 1)), ""), "", "*") $passwd = InputBox("Password", IniRead(@ScriptDir & "\data.dll", "Question", $random, ""), "", "*") If $passwd = IniRead(@ScriptDir & "\data.dll", "Word", $random, "") then MsgBox(64, "Correct", "Corect") ExitLoop Else $iTries -= 1 If $iTries Then MsgBox(16, "Wrong", "Wrong! You have " & $iTries & " attempts left.") Else MsgBox(16, "Fuck you!", "Youre PC will Shut Down....") Exit EndIf EndIf WEnd EndFunc what i wrong??? tnx for help Respect for all Edited June 28, 2008 by Kyme
martin Posted June 28, 2008 Posted June 28, 2008 pass() Func pass() Local $iTries = 4, $passwd $random=String(Random(1, 6, 1)) $pass=IniRead(@ScriptDir & "\data.dll", "Word", "1", "") $Ques=iniRead(@ScriptDir & "\data.dll", "Question","1", "") While 1 ;~ InputBox("Password", IniRead(@ScriptDir & "\data.dll", "Question", String(Random(1, 6, 1)), ""), "", "*") $passwd = InputBox("Password", IniRead(@ScriptDir & "\data.dll", "Question", $random, ""), "", "*") If $passwd = IniRead(@ScriptDir & "\data.dll", "Word", $random, "") then MsgBox(64, "Correct", "Corect") ExitLoop Else $iTries -= 1 If $iTries Then MsgBox(16, "Wrong", "Wrong! You have " & $iTries & " attempts left.") Else MsgBox(16, "Fuck you!", "Youre PC will Shut Down....") Exit EndIf EndIf WEnd EndFunc what i wrong??? tnx for help Respect for all It works for me so I guess there is something wrong with your data.dll. I tested with this [Word] 1=1 2=22 3=333 4=4444 5=55555 6=666666 [Question] 1=one 2=two 3=three 4=four 5=five 6=six Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Kyme Posted June 28, 2008 Author Posted June 28, 2008 (edited) It works for me so I guess there is something wrong with your data.dll. I tested with this [Word] 1=1 2=22 3=333 4=4444 5=55555 6=666666 [Question] 1=one 2=two 3=three 4=four 5=five 6=six damnit i'm so noob....i have rewrite my data.dll but i have didn't see the 4=4444 i have put the pass only 4:)).... what i can say...i am idiot:D tnx for help martin ^^ Respect for all^^ Cya Edited June 28, 2008 by Kyme
martin Posted June 28, 2008 Posted June 28, 2008 yes it's work but i wanna some change on it i wanna have that..... when question it's "one" pass to be 1 when question it's "two" pass to be 2 when question it's "three" pass to be 3 when question it's "four" pass to be 4 when question it's "five" pass to be 5 when question it's "six" pass to be 6 for each question to have only 1 pass whit this script have random question and pass.... then when question it's "one" pass can be all [Word] i wanna have if [Question]=1 then [Word]=1 not random [Word] i think you understand what i meen....if not let me know and i will explain better As far as I understand you the script already does what you want so that must mean I don't understand you. The script chooses a random number from 1 to 6 and this number is called $random. It asks question number $random and checks the answer against word number $random. So if that isn't what you want you need to explain what you do want in very clear steps. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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