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.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Re: iMacro script syntax highlighting in Notepad++ editor

by manotop on Thu Sep 08, 2016 6:55 am

It would be awesome if someone can make this for SublimeText as well :P
manotop
 
Posts: 12
Joined: Wed Aug 24, 2016 6:01 am

Re: iMacro script syntax highlighting in Notepad++ editor

by serbeer on Thu Sep 15, 2016 11:11 am

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: 35
Joined: Thu Sep 10, 2015 10:36 pm

Re: iMacro script syntax highlighting in Notepad++ editor

by serbeer on Thu Sep 15, 2016 1: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/tutorials_power_tips/ultraedit/add_a_wordfile.html
Attachments
iim.uew.zip
(922 Bytes) Downloaded 149 times
serbeer
 
Posts: 35
Joined: Thu Sep 10, 2015 10:36 pm

Re: iMacro script syntax highlighting in Notepad++ editor

by lucileburt on Fri Nov 17, 2017 2: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 2:54 pm, edited 1 time in total.
lucileburt
 
Posts: 1
Joined: Fri Nov 17, 2017 2:18 pm

Re: iMacro script syntax highlighting in Notepad++ editor

by chivracq on Sat Nov 18, 2017 12: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)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6490
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iMacro script syntax highlighting in Notepad++ editor

by arun.testing3 on Sun Nov 26, 2017 11:14 am

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.
arun.testing3
 
Posts: 5
Joined: Wed Oct 14, 2015 11:00 pm

Re: iMacro script syntax highlighting in Notepad++ editor

by chivracq on Sun Nov 26, 2017 12: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)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6490
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iMacro script syntax highlighting in Notepad++ editor

by arun.testing3 on Sun Nov 26, 2017 7:48 pm

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:
arun.testing3
 
Posts: 5
Joined: Wed Oct 14, 2015 11:00 pm

Previous

Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 6 guests

-->