General
: K-Meleon Forum
General discussion about K-Meleon.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=james] I have run into a small problem while coding the duplicates feature. I am not getting the results that I expected from gsub statement. It is supposed to find the string '[1].url' and replace it with the string '[2].url'. It is only finding and replacing the '[1' so my result looks like 'Something Wicked[2].url].url'. I will include the snippet.kmm I am using for testing. I hope someone can fix this as it is the last part of macro code, except for the call to JScript, that is needed for the project. Note the results from snippet are in the clipboard so you have to open an editor like notepad and paste to it. This is to run in a loop so I cannot just hard code the '[1].url'. You may have to adjust the 3 in the setmenu statement depending on how many items you already have in your favorites menu. # snippet.kmm _Snippet_RunCode{ $_integer = 2 ; $_pathx = "Something Wicked[1].url" ; $_path_chg = gsub("[".$_integer-1 ."].url" ,"[".$_integer."].url",$_pathx); setclipboard($_pathx.\n.$_path_chg) ; } _Snippet_ModMenu{ # add another option to help menu setmenu(F&avorites,macro,"Snippet Test",_Snippet_RunCode,3):0; } $OnInit=$OnInit."_Snippet_ModMenu;";[/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development