Idea collecting: What i wanna do with scripting

Started by Stefan, April 29, 2009, 04:45:58 PM

Previous topic - Next topic

Stefan

While browsing an long (long!) log file
i came to an line like " xxxx path\string\xxxx"
and i know there are many (many) of this kind of line, only differ at the end of the line.

Now i want to write an script to
- take the selection "path\string" into an var
- search the next line NOT containing that string (skipping that way all that similar lines)
- go one line up (to the very last line containing that string)
- go to END OF LINE
- insert {Enter} three times
Done.

I will scroll/read down the rest off the log on my own. (till the next bulk of several lines)



--- or an another possibility:
- take the selection "path\string" into an var
- set an bookmark
- search the next line NOT containing that string (skipping that way all that similar lines)
- go one line up (to the very last line containing that string)
- go to END OF LINE
- select up to bookmark
- delete


or
- goto pos1
- enable line selection mode
- select whole line
- while (current.line contains "path\string")
       go one down (while selecting)
  Loop
- delete
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

Stefan

Concatenate Next Line
(just join the next line without doing an selection first)
- go to end of current line
- remove line break
- add an blank
- remove all whitespaces if any

Example:
First line, the current *|* line.
        Second line.

will get:
First line, the current line.*|* Second line.

instead of:
First line, the current line.        Second line.*|*
Stefan, HippoEDIT beta tester 
HippoEDIT - the editor programmers wants to code thyself when they are dreaming.        -Don't just edit. HippoEDIT!-

scunliffe

I recently needed to apply some cleanup/formatting passes on some code files.  In order to be able to control the logic, I needed something I could program in.
It was a hack, but I whipped up a simple HTML page with a giant textarea that I ran in my browser. I copy/pasted my code into... ran several JavaScript functions against it, the copy/pasted the code back into HippoEDIT.

The functions I'm running would take 20-60min to perform manually one by one (if I could remember them all) if I did it in the editor, so the tool is invaluable even with the copy/paste switch between apps.

However if I had access to write scripts that ran inside HippoEDIT I'd be golden.  I'm sure an elaborate API would be awesome, but even just access to get/set the string for the entire document would be all I would need.

I'm not sure what the intended scripting language is, but anything similar to JavaScript/PHP syntax would be awesome for me. :)

alex

Stephen,

.... it is in from 1.50. Most of the plugins are written in JavaScript. You can also write in VBScript or Python.

http://wiki.hippoedit.com/scripting/start

;)

BR, Alex.

HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]