Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: VBS - Hit and run Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
SteveA
Groupie
Groupie


Joined: November 28 2002
Location: United States
Online Status: Offline
Posts: 49
Posted: November 28 2002 at 22:57 | IP Logged Quote SteveA

Hi....

I've written a script in VB which uploads motion pictures from X10 cams to my web site every 15 minutes. Works great except.... PH waits for the script to complete before continuing execution, it 'hangs'. I've tried the routine as both a 'Sub' and as a 'Function' with the same results. Files are about a 1/4 meg in size so at my 28.8 this takes the program off line for what seems like forever. Is there a way to call a script and return before it's finished executing?

Thanks, SA

ps. Been using the program for awhile now and love it...



__________________
SteveA
Back to Top View SteveA's Profile Search for other posts by SteveA Visit SteveA's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 03 2002 at 14:59 | IP Logged Quote dhoward

Steve,

Sorry its taken so long to respond.  Ive been out of town for the Thanksgiving holidays.

There is no way to make the script run asynchronously from within PowerHome.  However, based upon your description of what you are doing, it doesn't sound as if you need the script to run within PowerHome.  If the script is not directly attempting to control PowerHome using the PH functions, then you should be able to have PowerHome execute a vbscript asynchronously from the command line.  Even if you are doing some control in the script, you should be able to split the script so that the time-consuming upload portion is by itself and able to be launched from the command line. 

Depending upon the version of Windows you are using and whether or not you've installed Microsoft scripting, just make sure that the script has the extension ".vbs" and launch it using the macro command "Launch App".  If your script was named "upload.vbs" then your Send Keys parameter for the Launch App command would be "wscript upload.vbs".  This will launch the script asynchronously and PowerHome will not wait for it to finish. 

Dave.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
SteveA
Groupie
Groupie


Joined: November 28 2002
Location: United States
Online Status: Offline
Posts: 49
Posted: December 03 2002 at 23:01 | IP Logged Quote SteveA

Dave,

I just did the Homer Simson, doh... something about not seeing the forest cause the tree's were in the way. Have this 'mother of all vbscripts' and breaking out this sub as a stand alone would be way to easy. Been hacking since the TRS80 day's and appreciate the effort that's gone into PH... keep up the great work....



__________________
SteveA
Back to Top View SteveA's Profile Search for other posts by SteveA Visit SteveA's Homepage
 

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