NX Journal - Using MSScriptControl.ScriptControl and VBScript
NX Journal - Using MSScriptControl.ScriptControl and VBScript
(OP)
Has anyone successfully used Microsoft ScriptControl in an NX Journal (VB.Net). I would like to incorporate some VBScript code into my journal, but I can't get NX to recognize:
Since you are going to ask "Why would you want to use VBScript?" I am having trouble with the FolderBrowserDialog to select a folder and I wanted to use shell.BrowseForFolder, hoping I could get that to work...so if anyone had another workaround to allow a user to select a folder, I would be interested in that as well.
Thanks,
Jeff
CODE
Imports Interop.MSScriptControl ... Dim Script = New MSScriptControl.ScriptControl Script.Language = "VBScript" ...
Since you are going to ask "Why would you want to use VBScript?" I am having trouble with the FolderBrowserDialog to select a folder and I wanted to use shell.BrowseForFolder, hoping I could get that to work...so if anyone had another workaround to allow a user to select a folder, I would be interested in that as well.
Thanks,
Jeff





RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
http://nxjournaling.com/content/user-input-folder-...
Siemens limits the other libraries that you can reference with plain journaling, the Interop probably isn't one of them. If you have a .net author license, you can reference any libraries that you want.
www.nxjournaling.com
RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
Thanks, but for some reason when I use FolderBrowserDialog, my journal just hangs. I can use OpenFileDialog and get a working file selection folder, but FolderBrowserDialog doesn't work for some weird unknown reason.
Jeff
RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
www.nxjournaling.com
RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
I can run a journal with just the FolderBrowserDialog in it, but when I try to add the FolderBrowserDialog to my existing journal, it hangs.
Jeff
RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
www.nxjournaling.com
RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
CODE
Private Sub Button13_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button13.Click Dim folderBrowserDialog1 As New FolderBrowserDialog With FolderBrowserDialog1 .RootFolder = Environment.SpecialFolder.MyComputer .SelectedPath = "" .Description = "Select a Destination Folder" If .ShowDialog = DialogResult.OK Then Destination = .SelectedPath Else Exit Sub End If End With MsgBox("You picked " & Destination) End SubAs I said, I have a similar subroutine which works for OpenFileDialog, so I don't understand why it gets hung on this.
And yes, in a standalone journal the code above does work.
Jeff
RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
www.nxjournaling.com
RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
Jeff
RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
My journal is meant to be executed from the command line "run_journal" executable, but when I run it that way, I have the problem above.
If I run the journal from within an NX session the FolderBrowserDialog works fine.
So what would be different between the environment in which I run from "run_journal" vs. within NX?
(Maybe I need to open a new thread since the current subject to this thread makes little sense at this point)
Jeff
RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
www.nxjournaling.com
RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
Sigh.
Jeff
RE: NX Journal - Using MSScriptControl.ScriptControl and VBScript
http://glassocean.net/how-to-create-a-treeview-fil...
in order to create my own folder dialog window that works when run from "run_journal".
Jeff