OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   Macros/Add-ons (http://forum.oberonplace.com/forumdisplay.php?f=21)
-   -   Starting PhotoPaint From Draw (http://forum.oberonplace.com/showthread.php?t=1104)

xombie 22-07-2005 11:09

Starting PhotoPaint From Draw
 
Hello All,
when i run this lil snippet, I get presented with an error. It still works though. Anyone know whats going wrong????

<code>
'-------------
Sub TESTOPENCP()
Dim myappid As String, returnvalue
mayappid = Shell("C:\Program Files\Corel\Corel Graphics 12\Programs\CorelPP.exe", 1)
AppActivate myappid
End Sub
'----------------

<code/>
The application and the error pop up at the same time.
Any clues are welcomed.
Thanx, Andy

shelbym 22-07-2005 14:09

Error Message
 
The error message I got was "variable not defined". That is because you have myappid spelled as mayappid. Fixed that and it works fine.

Also you may want to look here:
http://forum.oberonplace.com/showpos...94&postcount=2

This example shows how you can test to see if the application is already running. Might help.

Thanks,

Shelby

xombie 23-07-2005 20:13

Thanx
 
Shelby, thankyou. The link you provided gave me some valuable insight. However, Yes I did make an error in my spelling. Strangely did not affect anything. The AppActivate command seems to be the trouble. It still Gave me an error after I checked spelling. Anyway.... I looked further and found that negating the .....AppActivate myappid..... altogether, seemed to work.
weird??!
Anyway, Thankyou. again
Andy


All times are GMT -5. The time now is 01:02.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com