Can't use the prompt command properly

Discussions and Tech Support specific to the iMacros Firefox Add-on.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
nma1919
Posts: 28
Joined: Fri Apr 17, 2009 1:56 pm

Can't use the prompt command properly

Post by nma1919 » Mon Jun 28, 2010 8:11 pm

What I want is to be prompted to enter data when I reach the "CONTENT=" section of the code so that I can input the time/dates myself and have the macro carry on after my input.

I know imacros has a prompt function, but I just can't seem to figure out how to use it. The wiki page for prompt didn't explain it well enough for me.

For this example I'm using it for a time sheet. Here is a sample code:

Code: Select all

TAG POS=1 TYPE=INPUT:IMAGE FORM=ID:timesheet ATTR=ID:ToolbarTimelog1_ButtonNewTask
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:timesheet ATTR=ID:Table_WebPanelID0_StartTime1 CONTENT=6/28/2010<SP>8:00:00<SP>AM
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:timesheet ATTR=ID:Table_WebPanelID0_EndTime2 CONTENT=6/28/2010<SP>8:15:00<SP>AM
TAG POS=1 TYPE=TEXTAREA FORM=NAME:timesheet ATTR=ID:Table_WebPanelID0_Desc4 CONTENT=Input<SP>task<SP>here
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:timesheet ATTR=ID:Submit
I'm currently trying to wrap my head around this. I know it probably has something to do with the !VAR1 function but I'm drawing blanks.
nma1919
Posts: 28
Joined: Fri Apr 17, 2009 1:56 pm

Re: Can't use the prompt command properly

Post by nma1919 » Wed Jun 30, 2010 3:39 pm

I know this is probably something simple. Is there any sample source code that would show the "prompt" window?
Tom, Tech Support
Posts: 3546
Joined: Mon May 31, 2010 4:59 pm

Re: Can't use the prompt command properly

Post by Tom, Tech Support » Sun Jul 11, 2010 3:18 pm

Hello nma1919 ,

Try this:

Code: Select all

TAG POS=1 TYPE=INPUT:IMAGE FORM=ID:timesheet ATTR=ID:ToolbarTimelog1_ButtonNewTask

PROMPT Please<SP>enter<SP>the<SP>start<SP>time: !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:timesheet ATTR=ID:Table_WebPanelID0_StartTime1 CONTENT={{!VAR1}}

PROMPT Please<SP>enter<SP>the<SP>end<SP>time: !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:timesheet ATTR=ID:Table_WebPanelID0_EndTime2 CONTENT={{!VAR1}}

TAG POS=1 TYPE=TEXTAREA FORM=NAME:timesheet ATTR=ID:Table_WebPanelID0_Desc4 CONTENT=Input<SP>task<SP>here
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:timesheet ATTR=ID:Submit
Regards,

Tom, iMacros Support
Post Reply