anixon Posted March 7, 2007 Share Posted March 7, 2007 Attached is a snippet of code covering password processing. You will notice that the code includes routines which produces audio and a visual displays that a process is occuring. When running Scitec/SyntaxCheck Prod I get a syntax error for the code calculating desktopwidth and desktopheight In one case the desktopwidth and desktopheight is divided by 2 the code as written (Tooltip code line) error reported at the divide sign "/" Can someone help me fix the syntax error Thanks Ant.... CODE#include<String.au3> Global $message = "", $logo = 0, $display = "Password Process" ;Password Processing ; Func password() While 1 $user1 = (_StringEncrypt(0, IniRead(@ScriptDir & "\inifiles\my.ini", "password", "pword1", "99"), "pw1234", 1)) $user2 = (_StringEncrypt(0, IniRead(@ScriptDir & "\inifiles\my.ini", "password", "pword2", "99"), "pw1234", 1)) $user3 = (_StringEncrypt(0, IniRead(@ScriptDir & "\inifiles\my.ini", "password", "pwdmin", "99"), "pw1234", 1)) $pw = InputBox("TITLE", @CRLF & $display & @CRLF & @CRLF & " [Password] [H]elp or e[X]it then [Enter] to Process a Selection" & @CRLF, "", "*", 400, 175) If $pw = "H" Then ToolTip(@LF & " All Passwords are CASE SENSITIVE", (@Desktopwidth () / 2) , (@desktopheight () / 2), "HELP - Admin Password", 1) Sleep(7500) ToolTip("") ElseIf $pw = "E" Or $pw = "X" Then Exit ElseIf @error = 1 Then $message = " Cancelled" DisplayMessage() ElseIf $pw = "" Then plbeep() $message = " VALID Input Required" DisplayMessage() ElseIf StringRegExp($adminpw, $user1) = 1 Then dosomething () ElseIf StringRegExp($adminpw, $user2) = 1 Then dosomething () ElseIf StringRegExp($adminpw, $user3) = 1 Then dosomething () Else plbeep() $message = " Password does NOT MATCH" DisplayMessage() plmonitoraf() EndIf WEnd EndFunc ;==>password ;Message Box Subroutine ; Func DisplayMessage() SplashTextOn("TITLE", $message, 250, 50, 600, 500, 36, "times new roman", 10, 600) Sleep(2000) SplashOff() EndFunc ;==>DisplayMessage ;Beep Subroutine ; Func plbeep() For $i = 4 To 1 Step - 1 Beep(500, 50) Sleep(100) Next EndFunc ;==>plbeep ; Activity Flash Subroutine ; Func plmonitoraf() For $i = 2 To 1 Step - 1 If $logo = 1 Then $af = @ScriptDir & "\banners\logogrn.jpg" Else $af = @ScriptDir & "\banners\logored.jpg" EndIf SplashImageOn("", $af, 30, 30, (@Desktopwidth () - 60) , (@desktopheight () - 100), 1) Sleep(400) SplashOff() $af = @ScriptDir & "\banners\logoblink.jpg" SplashImageOn("", $af, 30, 30, (@Desktopwidth () - 60), ) (@desktopheight () - 100)), 1) Sleep(400) SplashOff() Next If $logo = 1 Then $af = @ScriptDir & "\banners\logogrn.jpg" Else $af = @ScriptDir & "\banners\logored.jpg" EndIf SplashImageOn("", $af, 30, 30, (@Desktopwidth () - 60) , (@desktopheight () - 100), 1) Sleep(400) SplashOff() $logo = 0 EndFunc ;==>plmonitoraf Link to comment Share on other sites More sharing options...
_Kurt Posted March 7, 2007 Share Posted March 7, 2007 Macros do not need a () next to them, therefore replace the following:@Desktopwidth ()oÝ÷ ÙhØb±«¢+ÙÍѽÁÝ¥ÑAnd do the same for every macro containing a "()" at the end.Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
anixon Posted March 7, 2007 Author Share Posted March 7, 2007 Macros do not need a () next to them, therefore replace the following: @Desktopwidth ()oÝ÷ ÙhØb±«¢+ÙÍѽÁÝ¥Ñ And do the same for every macro containing a "()" at the end. Kurt Thanks for that information which I have applied to my code I no longer have any syntax errors. Its been a long process I started out writing 1 hour of code which resulted in 8 hours of debugging. Now I am slowly changing the numbers around. Never had so much fun without laughing. Ant... 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