Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shell Execute

Status
Not open for further replies.

AlanBreck1000

Programmer
Oct 20, 2005
28
US
Using shellexecute() template to open a picture viewer irfanview with the
following code in the accept embed of a button:
Glo:ShellExFileName='c:\program files\irfanview\i_view32.exe'
IMPURLHandler(0{PROP:Handle},clip(Glo:ShellExFileName))

I have a local declared variable Loc:Filename, what would be the proper
syntax to add this variable to the end of the first line in order to open up
this file with the irfanview program.

Thank you
 
Also tried the following using the run command
RUN ('c:\progra~1\pj60\i_view32.exe')
But I guess what I am asking is, how do you add a variable which contains a filename to the end of the line of code to load that file up with the program. i.e.
RUN ('c:\progra~1\pj60\i_view32.exe bwimg001.jpg')&loc:filename
 
Hi Alan,

If IrfanView is the default program for Opening Icons, you just need to open the Icon file (FileName.ICO) and don't have to specify the EXE file. So, just set the file name as the ICO file and the ShellExecute template will change this (Glo:ShellExFileName='c:\program files\irfanview\i_view32.exe') to Glo:ShellExFileName='<path>\FileName.ICO'.

Regards
 
Thank you Shankar,

I have a button on the window to load up an image file and this info is stored in a Local variable called Loc:Filename. The filename will change thus the variable. What I want to do is add another button so the user can open up an image manipulation program to zoom in on the file etc. When I use your suggestion above I would like to use the variable as the filename is this possible?

My example definetly wrong

Glo:ShellExFileName=loc:filename
IMPURLHandler(0{PROP:Handle},clip(Glo:ShellExFileName))
 
Shankar,
Figured it out. Just use the Global variable ShellExFilename and equate it to the Databsed Filed in this case MAI:pic1 and it will open the picture with the default program associated with the file extension.

Thank you for pointing me in the right direction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top