PROMPT Messagebox - Yes - No - Cancel (end)
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
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
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
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
Re: PROMPT Messagebox - Yes - No - Cancel (end)
This functionality would greatly enhance iMacros, especially for those of us that are looking to do write a script without having to use other means to execute (use of VB, javascript, etc.).
Please add this functionality to your next release of iMacros.
Please add this functionality to your next release of iMacros.
Re: PROMPT Messagebox - Yes - No - Cancel (end)
Some Update on this one and finally some GOOD NEWS, as I've finally discovered a way to achieve a Conditional PROMPT on FF in pure '.iim', thanks to another Bug (ah-ah-ah...!) that I just discovered... Youpidoo...!! Ah-ah...!, ironic to see that one Bug helps to solve (or at least to find a Workaround for another one)...! I'm not completely sure yet it will be applicable for "complex" PROMPT's with Input Variables as it would require to embed Vars in Vars and I know for example that it's not possible to embed a Command in a Var, but it will work for "simple" Display OK-PROMPT's.
Tja, let's play a little Game and see if sbd else, TechSupport for example eh-eh-eh...!, can discover it as well..., gniarf-gniarf...!
Hint Nr 1:
The (2nd) Bug I just discovered gives the following RuntimeError:(Tested on iMacros for FF v8.8.2, Pale Moon v24.6.2 (=FF31), Win7-x64.)
Tja, let's play a little Game and see if sbd else, TechSupport for example eh-eh-eh...!, can discover it as well..., gniarf-gniarf...!
Hint Nr 1:
The (2nd) Bug I just discovered gives the following RuntimeError:
Code: Select all
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITransferable.getTransferData], line 9 (Error code: -1001)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: PROMPT Messagebox - Yes - No - Cancel (end)
Hum..., nobody wants to play with me...!!!???chivracq wrote:Tja, let's play a little Game and see if sbd else, TechSupport for example eh-eh-eh...!, can discover it as well..., gniarf-gniarf...!
Hint Nr 1:
The (2nd) Bug I just discovered gives the following RuntimeError:(Tested on iMacros for FF v8.8.2, Pale Moon v24.6.2 (=FF31), Win7-x64.)Code: Select all
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITransferable.getTransferData], line 9 (Error code: -1001)
OK, Hint Nr 2:
Part of the Trick is to use an Empty String... in a Var, like I already mentioned...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: PROMPT Messagebox - Yes - No - Cancel (end)
Hum, not many People seem to be interested, grr...!! But OK, I've got my Proof of Concept ready and it works fine... but only for Informative PROMPT's, and not for PROMPT's that require some User Input, because the Technique I use would require to be able to embed a Variable in a Variable and it doesn't work, iMacros treats the embedded Var as a String. I miss a Switch/Command like '#NOVAR#' that does the contrary and treats the Double Curly Brackets of a Var as a String... Or like I've already asked as an Enhancement Request, I miss a "Super" Built-in Var that could contain Commands like 'PAUSE', 'REFRESH', even 'PROMPT' and other (Built-in) Vars.chivracq wrote:Hum..., nobody wants to play with me...!!!???chivracq wrote:Tja, let's play a little Game and see if sbd else, TechSupport for example eh-eh-eh...!, can discover it as well..., gniarf-gniarf...!
Hint Nr 1:
The (2nd) Bug I just discovered gives the following RuntimeError:(Tested on iMacros for FF v8.8.2, Pale Moon v24.6.2 (=FF31), Win7-x64.)Code: Select all
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsITransferable.getTransferData], line 9 (Error code: -1001)
OK, Hint Nr 2:
Part of the Trick is to use an Empty String... in a Var, like I already mentioned...
But anyway, it is already Friday afternoon (for me in Europe), so I will already disclose my Proof of Concept, in case anybody wants to play with it on a boring Friday afternoon at work or during the WE, ah-ah...!!
The little Bug I discovered while doing some Testing for this Thread [EDIT: 2020-05-27: Link is dead as the Thread seems to have been deleted, hum..., strange... ] with 'PROMPT' and the Clipboard came from the fact that I wanted to reset the Content of the Clipboard to NULL between several Tests in the same Macro but iMacros treats "NULL" in 'SET !CLIPBOARD NULL' like a String. Funny I thought, but no Pb, I will just set it to an Empty String then:
Code: Select all
SET !CLIPBOARD ""
PROMPT {{!CLIPBOARD}}
Hum, strange, I thought, I tried a few things with Temp (Built-in) Vars, but same Result each time the Clipboard has been set to an Empty String and I tried to PROMPT it... But the good news was when using '!ERRORIGNORE', the 'PROMPT' Statement just does nothing and that gave me the clever Idea to try to misuse that Behaviour for a Conditional PROMPT, and yep, it works, but only for Informative PROMPT's, like I already mentioned.
So here is the Proof of Concept, you can just run it as is, first 1 Play and after with Loop (=10 or >10), It contains several Conditional PROMPT's that are self-explanatory with some extra Info. Enjoy and Feedback welcome...!
'This Macro is a Proof of Concept to demonstrate a Conditional PROMPT in pure '.iim' for iMacros for FF.
'Several Conditional PROMPT's will be displayed while looping the Macro, and only for a few specific Loops.
'Unfortunately, this Method only works for Informative PROMPT's and not for PROMPT's that require some User Input.
'Warning...!: This Technique uses the OS Clipboard and resets it a few times to NULL,
'... meaning that you lose the Content of the Clipboard if you had stg stored in it before running/looping this Macro. Oops...!
'>
'Proof of Concept made by 'JF CHIVRACQ', January 2016, for the iMacros Forum.
'Feel free to reuse/improve. Enjoy...!!
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
'This Macro is a Proof of Concept to demonstrate a Conditional PROMPT in pure '.iim' for iMacros for FF.
'Several Conditional PROMPT's will be displayed while looping the Macro, and only for a few specific Loops.
'Unfortunately, this Method only works for Informative PROMPT's and not for PROMPT's that require some User Input.
'Warning...!: This Technique uses the OS Clipboard and resets it a few times to NULL,
'... meaning that you lose the Content of the Clipboard if you had stg stored in it before running/looping this Macro. Oops...!
'>
'Proof of Concept made by 'JF CHIVRACQ', January 2016, for the iMacros Forum.
'Feel free to reuse/improve. Enjoy...!!
'SET Clipboard_Temp {{!CLIPBOARD}}
'Loop 1:
SET PROMPT_Msg "This is a Conditional PROMPT, only for Loop=1."
ADD PROMPT_Msg <BR><BR>
ADD PROMPT_Msg "Try looping this Macro for more than 10 times, you will get another Conditional PROMPT at Loop=5 and Loop=10 and the Macro will automatically stop after the last PROMPT at Loop=10...!"
'>
SET !CLIPBOARD EVAL ("if('{{!LOOP}}'==1){var x='{{PROMPT_Msg}}';} else {x='';}; x;")
PROMPT {{!CLIPBOARD}}
'Loop 3:
SET PROMPT_Msg "BUG...!! This is only Loop=3, I'm not supposed to get a PROMPT for this Loop...!"
ADD PROMPT_Msg <BR><BR>
ADD PROMPT_Msg "But hum, I didn't get a PROMPT for Loop=2, so hum..., maybe it works...!"
'>
SET !CLIPBOARD EVAL ("if('{{!LOOP}}'==3){var x='{{PROMPT_Msg}}';} else {x='';}; x;")
PROMPT {{!CLIPBOARD}}
'Loop 5:
SET PROMPT_Msg "OK, this is Loop=5, I expected this PROMPT and I didn't get one for Loop=4. This looks good...!"
ADD PROMPT_Msg <BR><BR>
ADD PROMPT_Msg "The next (and final) PROMPT should now only come at Loop=10."
'>
SET !CLIPBOARD EVAL ("if('{{!LOOP}}'==5){var x='{{PROMPT_Msg}}';} else {x='';}; x;")
PROMPT {{!CLIPBOARD}}
'Loop 10:
SET PROMPT_Msg "This is the final Loop (Loop=10), the Macro will now abort even if you specified a Nb>10 to loop it..."
ADD PROMPT_Msg <BR><BR>
ADD PROMPT_Msg "But notice that you only got PROMPT's at Loop=1+3+5+10."
ADD PROMPT_Msg <BR><BR>
ADD PROMPT_Msg "Unfortunately, this Method only works for Informative PROMPT's and not for PROMPT's that require some User Input."
ADD PROMPT_Msg <BR><BR>
ADD PROMPT_Msg "Warning...!: This Technique uses the OS Clipboard and resets it a few times to NULL, meaning that you lost the Content of the Clipboard if you had stg stored in it before running/looping this Macro. Oops...!"
ADD PROMPT_Msg <BR>
ADD PROMPT_Msg "(And the Content of this current PROMPT is now stored in the Clipboard...!)"
ADD PROMPT_Msg <BR><BR>
ADD PROMPT_Msg "Proof of Concept made by 'JF CHIVRACQ', January 2016, for the iMacros Forum."
ADD PROMPT_Msg <BR>
ADD PROMPT_Msg "Feel free to reuse/improve. Enjoy...!!"
'>
SET !CLIPBOARD EVAL ("if('{{!LOOP}}'==10){var x='{{PROMPT_Msg}}';} else {x='';}; x;")
PROMPT {{!CLIPBOARD}}
'SET !CLIPBOARD ""
'Prepare Report Msg:
SET Report_Msg <SP><SP><SP>No<SP>Error...!
ADD Report_Msg <BR><BR>
ADD Report_Msg "Proof of Concept for a Conditional PROMPT at Loop=1+3+5+10 before aborting."
ADD Report_Msg <BR><BR>
'Abort Macro and display mini-Report:
SET !ERRORIGNORE NO
SET Abort_Macro EVAL("if('{{!LOOP}}'==10) {MacroError('{{Report_Msg}}');}")
Last edited by chivracq on Wed May 27, 2020 8:38 pm, edited 2 times in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: PROMPT Messagebox - Yes - No - Cancel (end)
Ah-ah...!, Update Novb 2016, with again some good news, ah-ah...!
Concerning the following "buggy" Statement advertised in the Wiki which doesn't work in FF since v7.5.x or v8.0.x:
Well, Advanced User @iimfun posted another Workaround in the following Thread:
- Re: Displaying window.alert()
=> This opens the door again for some more Complex Conditional PROMPT than with my own Workaround, and even for Input PROMPT's as I guess it will work as well with 'confirm()' and I don't remember the name of the third similar JavaScript Function for DialogBoxes...
Concerning the following "buggy" Statement advertised in the Wiki which doesn't work in FF since v7.5.x or v8.0.x:
Code: Select all
URL GOTO=javascript:alert("TEST");
- Re: Displaying window.alert()
And yep, it works, I tested on:iimfun wrote:Sometimes a miracle may happenCode: Select all
URL GOTO=javascript:setTimeout("alert('TEST');",300);void(0);
Code: Select all
iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10-x64
+ iMacros for FF v8.9.7, FF47, Win10-x64
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: PROMPT Messagebox - Yes - No - Cancel (end)
Keeping Track of all Threads related to 'PROMPT' in this current Thread, => several Threads related to CR58 that appears to break the 'PROMPT' Command (in v8.4.4 for CR):
- Capturing EXTRACT data
- PROMPT not working in latest Chrome 58.xx
- Capturing EXTRACT data
- PROMPT not working in latest Chrome 58.xx
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: PROMPT Messagebox - Yes - No - Cancel (end)
But if you guys are looking for something special, here is it.