Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Updating a G.V. Counter - Help Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: October 02 2006 at 21:56 | IP Logged Quote smarty

OK..this should be an easy one, but I am stumped. I am trying to update a Global Variable {COUNTER} that I am using as a loop counter. In the macro below, I have Xlobby send a radio station to Powerhome to be announced via Winamp (using a variation of TonyNo's announce macro). If the station is "not there", the macro below closes a Winamp window that opens, and then retries the station up to 4 times (if the counter works). What am I doing wrong with the counter. It does not appear to count. Ideas? Am I not adding to it properly? I am not checking it properly? I do have it defined as a Global Variable.

Edit: Nevermind. My Goto label text was NOT in Quotes as it should have been.



insert into macroheader values ('WINAMP NOWPLAYING','WA SONG TITLE',0,0,1);

insert into macrodetail values ('WINAMP NOWPLAYING',1,10,'COUNTER',NULL,'int(0)',0,'');

insert into macrodetail values ('WINAMP NOWPLAYING',2,26,'',NULL,'start',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',3,38,'',NULL,'ph_winampctrl("pause",0,"")',0,'') ;
insert into macrodetail values ('WINAMP NOWPLAYING',4,31,'',NULL,'2',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',5,10,'NOWPLAYING',NULL,'ph_replaceall(ph_replace all(ph_replaceall(ph_replaceall(ph_replaceall(ph_winampinfo( "title",0),"''",""),"- Winamp [Paused] ",""),"mms://uni1.cox.streamaudio.com/",""),"mms://2.uni1.co x.streamaudio.com/",""),":","")',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',6,16,'',NULL,'if(ph_findwindow("Open file(s)", 1)=0, 12, 1)',0,'');

insert into macrodetail values ('WINAMP NOWPLAYING',7,38,'',NULL,'ph_addtoglobal("COUNTER",1)',0,'') ;

insert into macrodetail values ('WINAMP NOWPLAYING',8,38,'',NULL,'ph_switchto("Open file(s)", 1)',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',9,31,'',NULL,'.1',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',10,38,'',NULL,'ph_sendkeys("{esc}")',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',11,37,'',NULL,'3 attemts and no luck. Station is Unresponsive',0,'');

insert into macrodetail values ('WINAMP NOWPLAYING',12,16,'',NULL,'if({COUNTER}>3, 4, 1)',0,'');

insert into macrodetail values ('WINAMP NOWPLAYING',13,38,'',NULL,'ph_tts("close") + ph_tts("{COUNTER}")',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',14,38,'',NULL,'ph_ssrequest("192.168.0.101", 8500, "smarty", "12345", "FORMULA", "ph_run(''c:\program files\xlobby\xsend.exe ~~"plugin:command:XEvent:Add Immediat Event:&radio:retry station&~~" 8000 192.168.0.101'')")',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',15,27,'',NULL,'start',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',16,38,'',NULL,'ph_ssrequest("192.168.0.101", 8500, "smarty", "12345", "FORMULA", "ph_run(''c:\program files\xlobby\xsend.exe ~~"command:xlobby:button set text:playing:Station Unavailable~~" 8000 192.168.0.101'')")',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',17,16,'',NULL,'if(1=1, 999, 999)',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',18,38,'',NULL,'ph_macroparm( "ANNOUNCE", "{NOWPLAYING}", 7, 1, 2, 1,)',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',19,38,'',NULL,'ph_ssrequest("192.168.0.101", 8500, "smarty", "12345", "FORMULA", "ph_run(''c:\program files\xlobby\xsend.exe ~~"command:xlobby:button set text:playing:{NOWPLAYING}~~" 8000 192.168.0.101'')")',0,'');
insert into macrodetail values ('WINAMP NOWPLAYING',20,38,'',NULL,'ph_ssrequest("192.168.0.100", 8500, "smarty", "12345", "FORMULA", "ph_run(''c:\program files\xlobby\xsend.exe ~~"command:xlobby:button set text:playing:{NOWPLAYING}~~" 8000 192.168.0.100'')")',0,'');


Edited by smarty - October 03 2006 at 08:49


__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: October 02 2006 at 22:27 | IP Logged Quote dhoward

Heh,

Easy to overlook

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward'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