Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: default path Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
phil13
Groupie
Groupie
Avatar

Joined: December 19 2004
Location: France
Online Status: Offline
Posts: 60
Posted: April 21 2005 at 11:25 | IP Logged Quote phil13

Dave,

for simplify maintening, i would like to use default path in formula.

For example, i've write :
ph_runscript_3 ("..\vbscript\serena.vbs", "vbscript", 1, 2000, "cmd_ballon2", "off", 0, "0")

rather than :
ph_runscript_3 ("H:\Program Files\powerhome\vbscript\serena.vbs", "vbscript", 1, 2000, "cmd_ballon2", "off", 0, "0")

But it seems to works sometime and don't work other time ... The reference path seems to change with time.

What do i have to write ?

Thanks

Philippe
Back to Top View phil13's Profile Search for other posts by phil13
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: April 21 2005 at 13:44 | IP Logged Quote dhoward

Philippe,

Thats the problem that Peter was having. Over the course of time (or some unknown event) the current path would change.

One suggesting may be to use the ph_getphdir function. Something like:

ph_runscript_3(ph_getphdir() + "\vbscript\serena.vbs","vbscript",1,2000,"cmd_ballon2","off" ,0,"0")

The other thing perhaps would be to store the vbscript directory into a global variable and then use that:

ph_runscript_3("{VBDIR}\serena.vbs","vbscript",1,2000,"cmd_b allon2","off",0,"0")

where {VBDIR} = "H:\Program Files\powerhome\vbscript"

Since the path is subject to change, I would always code the full path rather than rely on the relative path.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
phil13
Groupie
Groupie
Avatar

Joined: December 19 2004
Location: France
Online Status: Offline
Posts: 60
Posted: April 21 2005 at 14:00 | IP Logged Quote phil13

perfect dave .. as always

thanks
Back to Top View phil13's Profile Search for other posts by phil13
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum