Junos Pulse is an awful (interface-wise) VPN client. I just noticed that they added an AS dictionary and now I’ve got my hopes up that I can retire my current GUI scripting solution for quickly toggling my VPN connection.
However, the AS dictionary is small and I can’t seem to figure out how to us it’s single command, “do PulseTray command”:
do pulse tray command
do PulseTray command (verb)run a Pulse Tray command with a direct parameter (from the Pulse Tray Commands suite)
function syntax
set theResult to do PulseTray command text ¬
ConnectionIndexStr text
result
integer : rresult code
parameters
Parameter Required Type Description
direct parameter required text commandId to be passed to the tray command
ConnectionIndexStr optional text a boolean parameter.
I can’t seem to find what to use for the commandID as indicated in the direct parameter description.
The one class in the dictionary is “connection”:
connection (noun), pl connectionsAn object that can contain connection details.
properties
Property Access Type Description
connectionButtonTitle get text the item’s buttin title
connectionDisplayName get text the item’s name
connectionServerUrl get text the item’s URl
connectionStatus get text the item’s status
indexStr get text the item’s index
It seems obvious that connection’s indexStr property is what to pass as “do PulseTray command”'s ConnectionIndexStr parameter, but I’m just guessing what to pass as the direct parameter to the command. Since it takes a text argument, it seems like it could be anything; some random string for the commandID, or maybe just a simple number.
I tried things like “0” and “1” and “connect” and “disconnect”, since it seems that this command should only be good for acting on a connection object, but everything’s returned a -1.
Unfortunately, Junos Pulse isn’t easy to acquire unless you’re part of an institution that insists on using it, so this may be hard for someone else to look at.
So I’m asking, is there a good way to probe to find how to use a poorly document command like this? Also, what’s the best way to share the dictionary in full to provide better information with my question?