Shell mode

  1. 5 weeks ago

    Hello,

    the following code start an external java applet:

    dim s as new shell
    dim f as FolderItem=GetFolderItem("").Child("vnc")
    s.mode=0
    dim cmd as String
    cmd="java -jar "+ f.ShellPath +"/viewer.jar -host="+ip+" -password="+passwd+" -showConnectionDialog=No"
    s.Execute (cmd)

    but it blocks the main ui. Changing to mode 1 or 2 does not block the main ui but won't start the java applet.

    Any ideas?

  2. @Marco W — You may try to add " &" at the end of your command

  3. i solved it by dragging a shell class into the main window, then shellmode=1 works and the apples starts...

  4. Jürg O

    Feb 18 Pre-Release Testers, Xojo Pro
    dim s as new shell

    Since this is a local Property in your method, it'll go out of scope before the (async) process is finished. So it works "by design" :)

    @Marco W i solved it by dragging a shell class into the main window

    Or you could add a property s of type Shell to your window and use that in your method: self.s = new shell. That way it should not get out of scope too soon (unless you're closing the Window).

or Sign Up to reply!