Author Topic: Idea collecting: What i wanna do with scripting  (Read 8088 times)

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 775
  • Karma: +6/-0
    • View Profile
Re: Idea collecting: What i wanna do with scripting
« Reply #15 on: June 29, 2010, 09:23:35 am »
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

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 775
  • Karma: +6/-0
    • View Profile
Re: Idea collecting: What i wanna do with scripting
« Reply #16 on: July 10, 2010, 04:05:39 pm »
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.*|*

Offline scunliffe

  • Registered User
  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Idea collecting: What i wanna do with scripting
« Reply #17 on: June 14, 2016, 02:43:14 pm »
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. :)

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2169
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Idea collecting: What i wanna do with scripting
« Reply #18 on: June 17, 2016, 11:09:59 pm »
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.


 

Related Topics

  Subject / Started by Replies Last post
7 Replies
6344 Views
Last post July 26, 2009, 10:40:08 pm
by alex
15 Replies
9996 Views
Last post April 21, 2009, 11:27:55 am
by Stefan
39 Replies
14989 Views
Last post April 22, 2010, 06:40:49 pm
by alex
2 Replies
4667 Views
Last post October 07, 2009, 01:50:53 pm
by alex
3 Replies
2378 Views
Last post November 30, 2011, 12:20:59 am
by alex