another apps window access with shell

i want to access window of another apps in my apps window. how to get access of another apps window by using shell.

Windows ? Mac ? Linux ?

And, what do you mean by “access window” ? Access the data inside or simply position that window ?

i want to access the window which includes the graphical drawing in another application through shell in linux.

what means ‘access’ ?

you want to start another app from your Xojo App ? Then use folderitem.launch

you can not embed a window from another app into your Xojo App

Thanks for the help

I have error with this code

Dim sh As New Shell
Dim myapp As FolderItem
myapp=New FolderItem("/home/gp1.xojo_binary_project",FolderItem.PathTypeShell)
sh.Execute " open -n " +myapp.ShellPath

Dim sh As New Shell
Dim myapp As FolderItem
myapp=GetFolderItem("/home/gp1.xojo_binary_project",FolderItem.PathTypeShell)
If myapp <> nil and myapp.exists then
sh.Execute " open -n " +myapp.ShellPath

or

Dim myapp As FolderItem myapp=GetFolderItem("/home/gp1.xojo_binary_project",FolderItem.PathTypeShell) If myapp <> nil and myapp.exists then myapp.launch End If

i did not show any error now,but i cannot get output as opening the app.
i have type this code in apps open event

Dim sh As New Shell
Dim myapp As FolderItem
myapp=GetFolderItem("/home/gp1.xojo_binary_project",FolderItem.PathTypeShell)
sh.Execute " open -n " +myapp.ShellPath

you must check the file exists

in shell you can also add (after execute)

if sh.errorcode <> 0 then
msgbox (sh.errorcode + endofline + sh.readall)
End if

one tipp, you can use integers , then you have to write less

PathTypeAbsolute 0
PathTypeShell 1
PathTypeURL 2
PathTypeNative 3

GetFolderItem("/home/gp1.xojo_binary_project", 1)

yes the app exists in the path /home

i have an app with graphics drawn on its window over canvas saved as " gp1.xojo_binary_project".
i want to open this app in the background of another app say “gp3.xojo_binary_project”.
how can i do that

does this work?

Dim myapp As FolderItem
myapp=GetFolderItem("/home/gp1.xojo_binary_project", 3)
If myapp <> nil and myapp.exists then
myapp.launch
End If

and what do you use? Linux Win Mac ?

i use ubuntu linux

no i write this code in apps open event but dont work

in linux your home name is /home/username/

go to your filemanager, make a right click on your file , select copy and you have the path in clipboard

I don’t understand why you want to open a xojo binary project from your app.
that would start Xojo if you do that.

i dont want to open the project but want to run the projects window which includes drawing to be open in the applications background.

  • open the project which contains that window
  • export that window (right click - export)

then you can import this window in your new project

i have an app with graphics drawn on its window over canvas saved as " gp1.xojo_binary_project".
i want to open this app in the background of another app say “gp3.xojo_binary_project”.
i want to make the graphics drawn project i.e " gp1.xojo_binary project" to be transparent over another applications i. e. “gp3.xojo_binary_project”.
how can i do that

that does not work.

you can have 2 windows in one app and call window2 from window1 with ‘window2.show’