iMacro script syntax highlighting in Notepad++ editor

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
manotop
Posts: 12
Joined: Wed Aug 24, 2016 1:01 pm

Re: iMacro script syntax highlighting in Notepad++ editor

Post by manotop » Thu Sep 08, 2016 1:55 pm

It would be awesome if someone can make this for SublimeText as well :P
serbeer
Posts: 44
Joined: Fri Sep 11, 2015 5:36 am

Re: iMacro script syntax highlighting in Notepad++ editor

Post by serbeer » Thu Sep 15, 2016 6:11 pm

chivracq wrote:
Lightja wrote:Just want to express my gratitude to those who built these .xml files. Great work!

Also, for anyone using Windows 10, your userDefineLang.xml file can be found at "C:\Users\Username\AppData\Roaming\Notepad++"
You're welcome,ah-ah...!
But mine is a bit old already, I switched around v8.0/3 which must be some 5 years ago to the iMacros Editor (for FF) and didn't maintain it anymore...

Hum, a bit surprised btw not to get any Reaction from @serbeer who was asking for a working XML Sample...!? :shock:
Sorry chivracq, I only realized today that you responded to my post. I guess in a larger thread like this that is permanently pinned to the top of the forum section updates are hard to notice, as I was only checking for replies the first week after the post and lost all hope not seeing any. Normally, I check a few threads on top of each subforum, but ignore pinned ones that, of course, stay on top despite not being changed. Probably there is a better way to see newer posts? In other forums I use, email notifications are automatically sent if thread this someone responded to gets a new post/response.

Anyway, unfortunately xml syntax does not help when it comes to Ultraedit text editor. It uses very proprietary .uew "wordfiles" format to describe syntax highlighting for each of file extensions. And while there is pretty comprehensive library of wordfiles already built by its users, iim syntax wordfile is not among them. I am sure I could build my own wordfile, there are even tools/scripts developed by hardcore Ultraedit users to help with that, but I never had time to work on it, simply using the editor without highlighting for now, though I could install Notepad++ just for working with iim files I guess--but you know, programmers gets used/attached to their text editors over the year, so staying put for now...

Thanks!
serbeer
Posts: 44
Joined: Fri Sep 11, 2015 5:36 am

Re: iMacro script syntax highlighting in Notepad++ editor

Post by serbeer » Thu Sep 15, 2016 8:06 pm

Funny, but after all this time of not bothering, I spent an hour and created syntax file for Ultraedit using keywords from the .xml file chivracq posted a month ago.
I had to add a few keywords (such as EVAL, XPATH, EVENT, SELECTOR, !TIMEOUT_PAGE, !TIMEOUT_STEP) to his list and I am sure colors and some other Ultraedit-specific things could be much improved on if I spent more time on it, but even this basic version is much better than no highlighting, so fellow Ultraedit users, enjoy.

Code: Select all

/L12"Imacros" Nocase Line Comment Valid Columns = [1] Line Comment = ' String Chars = "' File Extensions = IIM
/Colors = 0,8421504,8421376,8421440,255,
/Colors Back = 16777215,16777215,16777215,16777215,16777215,
/Colors Auto Back = 1,1,1,1,1,
/Font Style = 0,0,0,0,0,
/Delimiters = ()+<=>&*| ,	
/C1"Keywords" Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
ADD
BACK
CLEAR CLICK CMDLINE
DISCONNECT DS
EXTRACT EVENT
FILEDELETE FILTER FRAME
IMAGECLICK IMAGESEARCH 
ONCERTIFICATEDIALOG ONDIALOG ONDOWNLOAD ONERRORDIALOG ONLOGIN ONPRINT ONSECURITYDIALOG ONWEBPAGEDIALOG
PAUSE PRINT PROMPT PROXY
REDIAL REFRESH
SAVEAS SET SIZE STOPWATCH
TAB TAG
URL
VERSION
WAIT WINCLICK
/C2 Colors = 255 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
ATTR ADDRESS
BUTTON BUILD BYPASS
C CLICK CMD CLOSE CLOSEALLOTHERS CONFIDENCE CONTENT CONTINUE
EXTRACT
F FILE FOLDER FORM
GOTO
KEYS
ID IMAGE ISP 
OPEN
PASSWORD POS
RECORDER
SECONDS STATUS
T TYPE
USER 
X
Y
/C3 Colors = 33023 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
EVAL
SELECTOR
XPATH
/C4 Colors = 32768 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
!COL
!DATASOURCE !DATASOURCE_COLUMNS !DATASOURCE_LINE !DIALOGMANAGER 
!ENCRYPTION !ERRORIGNORE !ERRORMACRO !EXTRACT !EXTRACT_TEST_POPUP !EXTRACTADD !EXTRACTDIALOG 
!FILELOG !FILESTOPWATCH !FOLDERIMACROS 
!IMAGEX !IMAGEY
!LOADCHECK !LOOP 
!MACROTIMEOUT !NOW !POINTER !REPLAYSPEED !SINGLESTEP !STOPWATCHTIME
!TIMEOUT !TIMEOUT_PAGE !TIMEOUT_STEP !URLCURRENT !URLSTART !USERAGENT !VAR1 !VAR2 !VAR3 !VARDEFAULT
/C5 Colors = 4210816 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
** $ % # {{
For those who do not know how to add it to Ultraedit, instructions are here: http://www.ultraedit.com/support/tutori ... dfile.html
Attachments
iim.uew.zip
(922 Bytes) Downloaded 927 times
lucileburt
Posts: 1
Joined: Fri Nov 17, 2017 9:18 pm

Re: iMacro script syntax highlighting in Notepad++ editor

Post by lucileburt » Fri Nov 17, 2017 9:20 pm

As there is no "Save As functionality phen375 reviews in the new iMacros for Firefox editor for using an existing Macro as a template to create a new one
I will be sticking with NPP for the time-being.
Last edited by lucileburt on Sat Nov 25, 2017 9:54 pm, edited 1 time in total.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: iMacro script syntax highlighting in Notepad++ editor

Post by chivracq » Sat Nov 18, 2017 7:43 am

lucileburt wrote:As there is no "Save As functionality in the new iMacros for Firefox editor for using an existing Macro as a template to create a new one
I will be sticking with NPP for the time-being.
Hum..., always funny how "new" (and "last"/"latest" as well) don't mean much and sound completely vague on a Technical Forum... :wink:
=> FCIM...! :mrgreen:

Quick Check but my "new" (...!? :? ) iMacros for FF Editor does have a 'save' Button which contains the 'Save as' Functionality... Hum, and my "old" one as well... OK, maybe good news for you, but nothing really "new" here, I would think... 8)

But hum..., if you are already using N++ and are happy with it, then there is no need to switch to some other Editor indeed, I used N++ for several years with a lot of "pleasure" and only switched (back) to the internal Editor around v8.40 when some old PC of mine exploded (oops!) and I had to move to some new one or a Laptop and couldn't recover quickly my customized Layout File for N++, then I gave a try at the internal Editor and I found it good enough (even if N++ is a bit more powerful) and have since stuck to it...
- (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...
arun.testing3
Posts: 5
Joined: Thu Oct 15, 2015 6:00 am

Re: iMacro script syntax highlighting in Notepad++ editor

Post by arun.testing3 » Sun Nov 26, 2017 6:14 pm

Loved it. :D
From this I have created a syntax highlighter html page to highlight the imacros code in my word file and finally in my blog. :idea:
I have uploaded it to my website. Please find it here https://arunelias.in/testing/imacros.html
Thanks a lot.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: iMacro script syntax highlighting in Notepad++ editor

Post by chivracq » Sun Nov 26, 2017 7:50 pm

arun.testing3 wrote:Loved it. :D
From this I have created a syntax highlighter html page to highlight the imacros code in my word file and finally in my blog. :idea:
I have uploaded it to my website. Please find it here https://arunelias.in/testing/imacros.html
Thanks a lot.
Woaw...!, very-very neat...! :D

I noticed a few "Glitches"...
- All 4 'Select All' Buttons do not really work for me (on Pale Moon v26.3.3 + FF v55.0.3), the Content of any of the 4 Input/Output Fields gets selected but directly within 0.1 Sec deselected again...

- A 'Clear' Button could be handy in the Input Field.

- The 1st Output Field (the one with the Highlights) doesn't like any "<" in the Code... (Legit Char to use in some 'EVAL()' Statement or as "<SP>" or "<BR>" in some Attribute or in the 'CONTENT' Parameter or in a 'PROMPT', any '<SP>' Code gets directly trimmed, and '<BR>' Codes get interpreted and cut a single Line into multiple Lines.)

- Any Command like 'ONDIALOG' that doesn't get "recognized" breaks the Highlighting for the rest of the Script.

- Input Field seems unlimited in Size (I pasted a 5000 Line Script with no Pb), but only the first 700 Lines were "treated" for Highlighting (well, until the first 'ONDIALOG' at least) while the first 750 Lines were handled in the 2nd Output Field with about the 2nd Half of the Content as one single unwrapped Block... But OK, you can disregard that one I guess, I don't think anybody would need to paste more than 500 Lines of Code, ah-ah...!

But..., very nice Work, Thanks for sharing... :D
- (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...
arun.testing3
Posts: 5
Joined: Thu Oct 15, 2015 6:00 am

Re: iMacro script syntax highlighting in Notepad++ editor

Post by arun.testing3 » Mon Nov 27, 2017 2:48 am

chivracq wrote: Woaw...!, very-very neat...! :D

I noticed a few "Glitches"...
- All 4 'Select All' Buttons do not really work for me (on Pale Moon v26.3.3 + FF v55.0.3), the Content of any of the 4 Input/Output Fields gets selected but directly within 0.1 Sec deselected again...

- A 'Clear' Button could be handy in the Input Field.

- The 1st Output Field (the one with the Highlights) doesn't like any "<" in the Code... (Legit Char to use in some 'EVAL()' Statement or as "<SP>" or "<BR>" in some Attribute or in the 'CONTENT' Parameter or in a 'PROMPT', any '<SP>' Code gets directly trimmed, and '<BR>' Codes get interpreted and cut a single Line into multiple Lines.)

- Any Command like 'ONDIALOG' that doesn't get "recognized" breaks the Highlighting for the rest of the Script.

- Input Field seems unlimited in Size (I pasted a 5000 Line Script with no Pb), but only the first 700 Lines were "treated" for Highlighting (well, until the first 'ONDIALOG' at least) while the first 750 Lines were handled in the 2nd Output Field with about the 2nd Half of the Content as one single unwrapped Block... But OK, you can disregard that one I guess, I don't think anybody would need to paste more than 500 Lines of Code, ah-ah...!

But..., very nice Work, Thanks for sharing... :D
Thanks for checking it out. I will correct it. :) Now I have to check my Wiki document for errors. :lol:
Post Reply