ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

[BEST] Boxer Editor Scripting Thread

<< < (2/2)

allen:
ROT13 is just a silly way of rotating through the alphabet as a 52 character index (caps and lowercase unique) to mask text. It's naturally bi-directional, not at all secure, but I guess can mask things from search engines and obfuscates the information from those unfamiliar with ROT13 . . . (Yvxr lbh svir zvahgrf ntb!) :)

AbteriX:
Thanks fellows!  You are quick and helpful, very kind of you.  :-*
So i have smtg to learn this evening. And i hope this thread will encourage people to try this scripting too.

.. .. .. .. .. ..

WRT ROT13 and Registry?
Some key in Reg are "encrypted" by M$ thereself, like
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\....

I can remember there is an other key too,   
and i had known an trick to decrypt this key automatically by adding an new key (and/or value)
But ths trick is not presend right now  :-\  :'(

EDIT: here a few links about this topic
http://www.codeproject.com/KB/security/registryencryption.aspx
http://www.autohotkey.com/forum/topic9154.html
http://blog.didierstevens.com/2006/07/24/rot13-is-used-in-windows-you%E2%80%99re-joking/

EDIT:
And here is the trick

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ Explorer\UserAssist\
New key "Settings"
New DWORD "NoEncrypt"   set to "1 "

Found by
http://www.winhelpline.info/forum/security-firewall/29066-exakter-sinn-des-userassist-schluessels.html


And sorry for false "encrypt" / "decrypt" using/mix-up.

---

That's why i want use ROT13... to de-crypt an key/value like them above.
And for to see how this works in Boxer  :D

.. .. .. .. .. .. .. .. ..

ROT13 is also handy to exchange text (email addy f.ex.) in forum not all should read easily (or crawl) .
F.ex. to ask an trick-question and add the answer "rot-ed"  :P

.. .. .. .. .. .. .. .. ..

Please people, come on and fill this tread with live..... what's to script next?

allen:
Here's one I use fairly frequently. It takes the body of a text file and activates it as a mailto link, sending it to your default e-mail client.  The arbitrary buffer size limits the size of document this works with, but it's handy if I'm working on something and want to jot down a quick message without switching to my mail client.
- If nothing is selected, line 1 is subject and the rest is the body
- If there is a selection, it is treated as the body and you are prompted for the subject

--- Code: C ---// Send the selected text as an e-mail message macro SendAsEmail(){  // Set prompt to 0 to disable subject prompt  int prompt = 1;  int inc;  string line;  string sel;  string subj;  string strout;  // Check for selection, if nothing selected  // Line 1 = subject, rest = body  // This is to ensure cursor placement doesn't  // truncate the url encoding  if ( GetSelectionSize <= 0 ) {    GetLineText(1,subj);    ChangeString(subj," ","%20");    for ( inc = 2; inc <= LineCount(); inc++ ) {      GetLineText(inc,line);      ChangeString(line," ","%20");      line += "%0a";      sel += line;    }  } else {    // Prompt for SUBJECT only if "prompt" is not 0    // Otherwise, blank subject is sent    if ( strlen(subj) < 1 && prompt > 0 ) {      GetString("Subject of Message",subj);      ChangeString(subj," ","%20");    }    // Fetch body, add spaces and line endings    GetSelection(sel);    ChangeString(sel,"\n","%0a");    ChangeString(sel," ","%20");  }  // Assemble mailto string  strout = "?subject=";  strout += subj;  strout += "&body=";  strout += sel;  // Send to mail client  OpenEmail(strout);}

AbteriX:
I have thought i have seen this feature in Boxer, but didn't find it. So i have taken this to try my first Boxer script.

Find user string and select lines till the string occurs first.
f.ex.
- scroll through an long text and wrote an char didn't exist in the whole text, like an '#'
- go back above to your start line (hint: bookmark) and search(via script) for '#' .... the script will select all lines between.

Find-and-select-to-find

--- Code: C ---// Find an string. Select all lines till the line where this string occurs first.  macro newmacro(){int LineStart, LineEnd, LineCurr;string FindAndSelectmyFind, myFind;         LineStart = LineNumber; // current line number at macro start         //REM ReadValue(FindAndSelectmyFind, myFind); // read last stored search value        GetString("Find what: ", myFind); // string to find and select to        //REM WriteValue(FindAndSelectmyFind, myFind); // save value for re-use         if (myFind != "")        {        // go across all lines from current start line to EOF, line by line                for (LineCurr = LineStart; LineCurr <= LineCount(); LineCurr++)                {                        if (LineContainsREi(LineCurr, myFind)) // if search string is found in line                {                                        LineEnd = LineCurr; // set var LineEnd to number of current line                                break; // stop the for loop                        }                }                 GoToLine(LineStart); // go back to start line where we came from                // go through all lines from our start line to the line where the string was found, line by line                    for (LineCurr = LineStart; LineCurr <= LineEnd; LineCurr++)                {                                SelectDown; // select each line between                }        }}

Unfortunately it seams as " GetString("Find what: ", myFind); "  didn't support to show user an suggestion?
I exspected something like: " int GetString(string prompt, string result, string suggestion) "
I will search for an alternative.



Perhaps this script is an improvement-idea for David.  ;) Smtg similar like "Go to..." and []extend selection ?

Next i will try to script  Find-and-select-to-bookmark ;-)

.

Boxer Software:
Hi Stefan,

I have thought i have seen this feature in Boxer, but didn't find it. So i have taken this to try my first Boxer script.
--- End quote ---

If you have a selection started, and then issue the Find command, there's an "Extend Selection" option on the Find dialog that should do what you like.

(Note: if the existing selection is of any size, the Scope will default to searching within the selection, so be sure to change the Scope to suit your need in order to enable the Extend Selection option.)


Best,

David Hamel
Boxer Software

Navigation

[0] Message Index

[*] Previous page

Go to full version