LoganPrice

Error Parsing function call trying to run a Published App

12 posts in this topic

I am getting this error when I run the .exe.  My goal is to run a Published App from my desktop.  I have the shortcut on my desktop and it launches correctly.  I copied the shortcut path the exists on my desktop and put it in the script.  I have searched and searched but can't figure out what it is.    I am extremely new to all of this.  Thank you so much for any assistance.  This is the first of the script that it doesn't like.

 

; Script Function:
;   Opens Surginet and starts Tracking Board

;Changes the default mode of matching Window titles to search for substrings instead of beginning strings
Opt("WinTitleMatchMode", 2)

;Sleep(10000))
Run "C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe" /CitrixShortcut: (1) /QLaunch "SGHS_65:PeriOP"

 

Share this post


Link to post
Share on other sites



When I add the (), I then get this error...

 

Share this post


Link to post
Share on other sites

Not sure why the screen print isn't showing, but the error is...

Line 2....

Error: Unknown function name.

Share this post


Link to post
Share on other sites
; Script Function:
;   Opens Surginet and starts Tracking Board

;Changes the default mode of matching Window titles to search for substrings instead of beginning strings
Opt("WinTitleMatchMode", 2)

; Wait 30 seconds for other processes to settle down on machine
;Sleep(60000)
;Sleep(20000)

; Run Citrix
;Run "C:\Program Files (x86)\Citrix\ICA Client\SelfServicePlugin\SelfService.exe"

;Sleep(10000))
Run ("C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe" /CitrixShortcut: (1) /QLaunch "SGHS_65:PeriOP")


; Wait for the Surginet Logon Screen to become active - it is titled "HNAM Logon" on English systems
WinWaitActive("HNAM Logon")

; Put in common password of sngreaseboard
Send("userid")
Sleep(300)
Send("{TAB}") ; jump to password
Sleep(300)
Send("password{ENTER}")



; Wait for the Surginet to become active - it is titled "SNSurgiNet" on English systems
WinWaitActive("SNSurgiNet")

; Wait 10 seconds and then send series of 'Enter' keys in case there is a startup mille message to answer
Sleep(20000)
Send("{N}")
Sleep(500)
Send("{ENTER}")
Sleep(500)


; Wait 5 seconds and then start the board by going to List (Ctrl-C, ^C;Alt-L, !L), wait 3 seconds,  arrow down to Show Board
Sleep(5000)
Send("!V")
Sleep(3000)
Send ("{DOWN 2}")
Sleep(3000)
Send("{ENTER}")

; Finished!

 

Share this post


Link to post
Share on other sites

I just modified the line to

Run ('"C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe" /QLaunch "Citrix PeriOP"')

and received an error from the citrix receiver.  It is attached

CitrixError.png

Share this post


Link to post
Share on other sites

So, I was able to launch the published folder with the attached code, but now it won't run the snsurginet.exe from the published app's desktop.  Any ideas?  Ugh, this is frustrating. Lol.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; Script Function:
;   Opens Surginet and starts Tracking Board

;Changes the default mode of matching Window titles to search for substrings instead of beginning strings
Opt("WinTitleMatchMode", 2)

; Wait 30 seconds for other processes to settle down on machine
;Sleep(60000)
Sleep(20000)

; Run Citrix
;Run "C:\Program Files (x86)\Citrix\ICA Client\SelfServicePlugin\SelfService.exe"

;Sleep(10000))
;Run ("C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe" /CitrixShortcut: (1) /QLaunch "SGHS_65:PeriOP")
;Run ('"C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe" /QLaunch "Citrix PeriOP"')

;Citrix Application Variables:
$ProgramFiles = @ProgramFilesDir
$PNAgent = "\Citrix\ICA Client\pnagent.exe"
$QLaunchSwitch = "/QLaunch"
$QLaunchArgument = "SGHS_65:PeriOP" ;Published Application Name
$QuoteCharacter = Chr(34)

Run($ProgramFiles & $PNAgent & " " & $QLaunchSwitch & " " & $QuoteCharacter & $QLaunchArgument & $QuoteCharacter)
Sleep(20000)

;Run Surginet

Run("C:\Program Files\Cerner\snsurginet.exe")

; Wait for the Surginet Logon Screen to become active - it is titled "HNAM Logon" on English systems
WinWaitActive("HNAM Logon")

; Put in common password of sngreaseboard
Send("userid")
Sleep(300)
Send("{TAB}") ; jump to password
Sleep(300)
Send("password{ENTER}")



; Wait for the Surginet to become active - it is titled "SNSurgiNet" on English systems
WinWaitActive("SNSurgiNet")

; Wait 10 seconds and then send series of 'Enter' keys in case there is a startup mille message to answer
Sleep(20000)
Send("{N}")
Sleep(500)
Send("{ENTER}")
Sleep(500)


; Wait 5 seconds and then start the board by going to List (Ctrl-C, ^C;Alt-L, !L), wait 3 seconds,  arrow down to Show Board
Sleep(5000)
Send("!V")
Sleep(3000)
Send ("{DOWN 2}")
Sleep(3000)
Send("{ENTER}")

; Finished!

 

Share this post


Link to post
Share on other sites
19 hours ago, LoganPrice said:

from the published app's desktop

Just trying to understand your issue (maybe you could provide some more detail).  Are you trying to run that exe from the citrix app?  Your code is on your local machine that you used to launch citrix correct?  If you are trying to run a program on the citrix server it will not work.


Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Share this post


Link to post
Share on other sites

Thank you so much for your posts!  I ended up using 2 scripts.  1 will be on the local desktop to launch the Published App. And then 1 is on the actual server to launch the application .exe.  Now I just need to figure out how to pass thru the login and password to the .exe that opens on the server.  Thank you again for everything.  I am not very savvy when it comes to this.

Share this post


Link to post
Share on other sites

I am.  Thank you so much for your help.  You rock!

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