Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: help with ph.run Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mustangcoupe
Super User
Super User
Avatar

Joined: August 08 2003
Location: United States
Online Status: Offline
Posts: 308
Posted: January 31 2009 at 14:53 | IP Logged Quote mustangcoupe

ok, ive been around a bit ans I still get confused with ' and " ...

can someone help me here... I am sending a command out using the PH.run command to send CID info to all computers on my network.

here is the basics of what I am tring to do...
Code:
"C:\Program Files\Windows Home Server\WHSAlert.exe" "Incomming Call" "CID INFO HERE" info 100


ph.run(file name argument1 argument2 argument3 argument4)

file name: C:\Program Files\Windows Home Server\WHSAlert.exe
argument1: Incomming call
argument2: globalvariable {CID}
argument3: info
argument4: 100

each argument needs to be sent in quotes to be processed properly

thanks


__________________
Todd Hannemann

HA newbie

   PowerHome - UPB - ELK    
Back to Top View mustangcoupe's Profile Search for other posts by mustangcoupe Visit mustangcoupe's Homepage
 
jbbtex
Senior Member
Senior Member


Joined: February 15 2007
Location: United States
Online Status: Offline
Posts: 181
Posted: January 31 2009 at 20:18 | IP Logged Quote jbbtex

If you haven't already you might try it like this. I don't use windows script so my example uses ph_run and this is just a guess.

Code:
ph_run("'C:\Program Files\Windows Home Server\WHSAlert.exe '" + "'Incomming Call '" + "'" + "{CID}" + "' " + "'info '" + "'100'")


But I'm like you, all the quotes start running together and make my eyes glaze over.

__________________
Brady

"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." - Gen. George S. Patton
Back to Top View jbbtex's Profile Search for other posts by jbbtex
 
mustangcoupe
Super User
Super User
Avatar

Joined: August 08 2003
Location: United States
Online Status: Offline
Posts: 308
Posted: January 31 2009 at 20:45 | IP Logged Quote mustangcoupe

getting better... I dont get a formula error but I do get a -1 response

__________________
Todd Hannemann

HA newbie

   PowerHome - UPB - ELK    
Back to Top View mustangcoupe's Profile Search for other posts by mustangcoupe Visit mustangcoupe's Homepage
 
jbbtex
Senior Member
Senior Member


Joined: February 15 2007
Location: United States
Online Status: Offline
Posts: 181
Posted: January 31 2009 at 21:34 | IP Logged Quote jbbtex

-1 means there was an error.

Try it by substituting a string for the GV.
Code:
ph_run("'C:\Program Files\Windows Home Server\WHSAlert.exe '" + "'Incomming Call '" + "'test string '" + "'info '" + "'100'")


edit: Thought I put this in the first time.

If it does work then we can figure out how to get the variable in.

Edited by jbbtex - February 01 2009 at 03:44


__________________
Brady

"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." - Gen. George S. Patton
Back to Top View jbbtex's Profile Search for other posts by jbbtex
 

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