I’ve read about using variables with the scripting API, I’ve tried to use an example posted on GitHub: https://github.com/A9T9/SeeShell/tree/master/Powershell/change-URL-at-runtime
I’m not able to get it working however. Below is the code I’ve written:
$seeShellObject = new-object -ComObject SeeShell.Browser
$openSeeShell = $seeShellObject.open(10)
Write-Host "Open SeeShell Browser:" $openSeeShell
$testURL = "http://fitnlabsspdev3.isis.cclrc.ac.uk/sites/XFU.ISIS/Pages"
$seeShellObject.setVariable("testURL", $testURL)
$goToDevSite = $seeShellObject.Play("C:\Users\XFU59478\Documents\SI Site BLAATs\Macros\GoToDevSite.see")
Write-Host "GoToDevSite:" $goToDevSite
$closeSeeShell = $seeShellObject.close(10)
Write-Host "Close SeeShell Browser:" $closeSeeShell
Below is a screenshot of the macro:
I’ve implemented this as shown on GitHub however when the macro runs, it looks for a URL ‘{testURL}’ (which obviously just results in a white page) instead of looking for the variable testURL. Inside the macro for the value of the open command, I’ve tried:
- {testURL}
- $testURL
- ${testURL}
- $testURL$
- { testURL }
All these combinations don’t seem to work. Any ideas on how to get SeeShell to look for the variable?
Thanks!