Jump to content
Sign in to follow this  

Error Parsing Function Call -- HELP!

Recommended Posts


When trying to execute this code, I am getting the error message stating: Error: Error parsing Function Call. This code was working before I added quite a few things and somewhere along the way I messed something up, and I cannot figure out where. Any help is appreciated!

(note, I have removed the server address that this script is designed to connect to and replaced it with a -- )

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
Global $readed
#Region ### START Koda GUI section ### Form=
$width = 300
$height = 350
$Form2 = GUICreate("AnswerFirst Remote", 300, 300, @DesktopWidth/2 - $width/2, @DesktopHeight/2 - $height/2)
GUICtrlCreateLabel("Choose a Terminal Server:", 50, 14, 200, 25)
$Combo1 = GUICtrlCreateCombo("", 50, 40, 145, 25)
GUICtrlSetData(-1, "Terminal Server 01|Terminal Server 02|Terminal Server 04|TS 03|TS 04")
$Button1 = GUICtrlCreateButton("Connect", 168, 185, 60, 17, 0)
$Checkbox = GUICtrlCreateCheckbox("Connect using Blink", 50, 160, 125)
GUICtrlCreateLabel("Username", 50, 75, 200, 25)
$username = GUICtrlCreateInput("", 50, 92, 200, 20)
GUICtrlCreateLabel("Password", 50, 120, 200, 25)
$password = GUICtrlCreateInput("", 50, 137, 200, 20)
#EndRegion ### END Koda GUI section ###
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
   Case $Button1
   $readed = GUICtrlRead($Combo1)
   $readuser = GUICtrlRead($username)
   $blinkdir = "C:\Program Files\Blink"
   If GUICtrlRead($CHECKBOX) = 1 Then Run($blinkdir&"\blink.exe",$blinkdir,@SW_MINIMIZE )
            Switch $readed
    Case $readed == "Terminal Server 01"
     $dir = "C:\AnswerFirst"
     $servername = "--"
     Run($dir&'\rdp.exe /u:'&$readuser&' /p:'&readpass&' /domain:Tampa /v:'& $servername,$dir,@SW_MAXIMIZE )
                Case $readed == "Terminal Server 02"
     $dir2 = "C:\AnswerFirst"
                    $servername2 = "--"
     Run($dir2&'\rdp.exe /u:'&$readuser&' /p:'&readpass&' /domain:Tampa /v:'& $servername2,$dir2,@SW_MAXIMIZE )
                Case $readed == "Terminal Server 04"
                    $servername3 = "--"
     $dir3 = "C:\AnswerFirst"
     Run($dir3&'\rdp.exe /u:'&$readuser&' /p:'&readpass&' /domain:Tampa /v:'& $servername3,$dir3,@SW_MAXIMIZE )
    Case $readed == "TS 03"
     $dir4 = "C:\AnswerFirst"
                    $servername4 = "--"
     Run($dir4&'\rdp.exe /u:'&$readuser&' /p:'&readpass&' /domain:Tampa /v:'& $servername4,$dir4,@SW_MAXIMIZE )
    Case $readed == "TS 04"
     $dir5 = "C:\AnswerFirst"
                    $servername5 = "--"
     Run($dir5&'\rdp.exe /u:'&$readuser&'/p:'&readpass&' /domain:Tampa /v:'& $servername5,$dir5,@SW_MAXIMIZE )

Share this post

Link to post
Share on other sites

Is readpass a variable or a function, because if it's a variable, it's missing the $. If it's a function it's missing the ().

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post

Link to post
Share on other sites

Shortly after posting, I realized that in my rush (and complete oversight) that I forgot the "$" in front of a variable and forgot to define that variable....Thanks to anyone that may have taken a look at it, but looks like I got it!

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.