Sign in to follow this  
Followers 0
anixon

Syntax Error

3 posts in this topic

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.... :whistle:

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

Share this post


Link to post
Share on other sites



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..

Share this post


Link to post
Share on other sites

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... :whistle:

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0