Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Web Macro Editing Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: February 26 2006 at 20:41 | IP Logged Quote TonyNo

In my quest to develop something like this, I have started by creating a PSP page to let you select an existing macro and display it on a web page.

PSP Macro Listing

Download it, put it in your powehome/web folder, and access it with your browser.

Commments/suggestions appreciated.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: February 27 2006 at 11:44 | IP Logged Quote dhoward

Tony,

This is looking good. Checked it out last night and it's a great start.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: February 27 2006 at 20:47 | IP Logged Quote TonyNo

Based on your response in another thread, I am trying to pull the commands from a table, but I'm missing something here...

Code:
<% ph_rtne( ph_sqlselect( 1, "select id, sequence, skip_line, type, type_data1, type_id, type_number, send_keys from macrodetail where id='[LOCAL3]' order by 1")) %>

<% ph_rtne( ph_sqlselect( 2, "select ddnumval, dddisplay, ddtype from dropdowns where ddtype = 12 order by ddnumval")) %>

<tr><th>Seq</th><th>Skip</th>& lt;th>Command</th><th>Data</th><th&g t;ID</th><th>Value</th><th>Send Keys/Dim/TTS/Formula</th></tr>
<% ph_rtne( ph_forloopwinc( "ph_concatvar( 1, 2, if( mod( ph_getvar_n( 1, 1), 2)=0, '<tr valign=top bgcolor=white><td>', '<tr valign=top bgcolor=#c0dcc0><td>') + ph_getdata( 1, ph_getvar_n( 1, 1), 2) + '0</td><td>' + case( ph_getdata( 1, ph_getvar_n( 1, 1), 3) when '0' then 'O' else 'X') + '</td><td>' + ph_getdata( 1, ph_getvar_n( 1, 1), 4) + '</td><td>' + ph_getdata( 1, ph_getvar_n( 1, 1), 5) + '</td><td>' + ph_getdata( 1, ph_getvar_n( 1, 1), 6) + '</td><td>' + ph_getdata( 1, ph_getvar_n( 1, 1), 7) + '</td><td>' + ph_getdata( 1, ph_getvar_n( 1, 1), 8) + '</td></tr>~r~n')", 1, [SQLROWS1], 1, 1) + ph_sqldestroy( 1) + ph_sqldestroy( 2)) %>
<% ph_getvar_s(1, 2)%>


Now, if...

Code:
ph_getdata( 1, ph_getvar_n( 1, 1), 4)

is the command type, why doesn't...

Code:
ph_getdata( 2, ph_getdata( 1, ph_getvar_n( 1, 1), 4), 2)

pull the appropriate string?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: February 28 2006 at 14:57 | IP Logged Quote dhoward

Tony,

I didnt trace it through completely, but I think I know what the problem is. The second SQL pulls a list of all macro commands, but if Im not mistaken, there may be skipped commands so you cant assume that the row number matches the command number.

What you may find easier is to combine your SQL statements into one by joining the tables like this:

Code:
select md.id,md.sequence,md.skip_line,dd.dddisplay,md.type_data1,md .type_id,md.type_number,md.send_keys from macrodetail md,dropdowns dd where md.id='[LOCAL3]' and md.type = dd.ddnumval and dd.ddtype = 12


This should make this type of thing much easier for you.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: February 28 2006 at 23:45 | IP Logged Quote TonyNo

Wow. I'll say that's easy!

Link updated!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo'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