Search found 536 matches
- 12 Jul 2012 19:05
- Forum: Scripts
- Topic: [script] Invert lines
- Replies: 0
- Views: 10734
[script] Invert lines
Here's another simple script I wrote a couple days ago and I thought I'd share with you: it changes the order of lines, i.e. line 1 line 2 line3 becomes line 3 line 2 line1 It deletes blank lines in the selection, btw: // turn off screen updating Document.BeginUpdate(); if (Document.SelLength == 0) ...
- 10 Jul 2012 20:04
- Forum: Scripts
- Topic: How i use the Delete()-procedure in JS ?
- Replies: 5
- Views: 20709
Re: How i use the Delete()-procedure in JS?
The code you propose triggers "Expression expected" error. It should be (as I mentioned above):
Code: Select all
var s = "My string";
DeleteStr(s,1,3);
- 10 Jul 2012 18:39
- Forum: Scripts
- Topic: How i use the Delete()-procedure in JS ?
- Replies: 5
- Views: 20709
Re: How i use the Delete()-procedure in JS ?
Still grappling with replace in a string? Try DeleteStr instead of Delete; works for me.
- 07 Jul 2012 14:27
- Forum: Scripts
- Topic: Replace In A String
- Replies: 1
- Views: 11305
Re: Replace In A String
Seems like it doesn't want to use empty string as a replacement at all. No idea how to circumvent it, though.
- 27 Jun 2012 19:00
- Forum: Scripts
- Topic: [script] Add smart block comments
- Replies: 0
- Views: 8496
[script] Add smart block comments
Recently I've learnt a neat trick, which I dubbed "smart block comments". The idea is that you can comment block of code out or "in" by adding or deleting just one space (this of course works only for languages that support block comments in the form of /* */). This is normal cod...
- 23 Jun 2012 11:33
- Forum: Scripts
- Topic: [bug] Could not execute command line!
- Replies: 2
- Views: 10312
Re: [bug] Could not execute command line!
What a coincidence! I came to conclusion I should have filled this in "Bugs" sections, so I started to move it there, when I saw you reply. Many thanks! You are, of course, right, double slash is the solution. And as for the docs, yes, they should tell the user to use double quotes. And I ...
- 21 Jun 2012 14:28
- Forum: Scripts
- Topic: [bug] Could not execute command line!
- Replies: 2
- Views: 10312
[bug] Could not execute command line!
This is the error message which I get while invoking MainApp.RunAppAndWait("c:\windows\notepad.exe", "", false, false); When I run MainApp.RunApp("c:\windows\notepad.exe", "", false, false); nothing happens at all. What's wrong? And yes, I have notepad.exe in ...
- 16 Jun 2012 10:51
- Forum: Syntax files
- Topic: Does anyone have an .htaccess syntax file?
- Replies: 3
- Views: 13429
Re: Does anyone have an .htaccess syntax file?
I'm glad it worked for you; alas, it haven't worked for me :cry: I removed "Tags" altogether and now I have random results: comments are still not highlighted as they should be, some elements lost their colors they had previously, and some other got colored. Oh, joy! :evil: Perhaps I shoul...
- 16 Jun 2012 08:04
- Forum: Syntax files
- Topic: Does anyone have an .htaccess syntax file?
- Replies: 3
- Views: 13429
Re: Does anyone have an .htaccess syntax file?
I once started writing it, but for some reason highlighting worked randomly (e.g. comments don't work for me at all), so I shelved it. I planned to review it later, but seems like this "later" haven't come yet :D Anyway, here it is:
- 06 Jun 2012 09:54
- Forum: Scripts
- Topic: [script] Switch case
- Replies: 0
- Views: 7419
[script] Switch case
I thought about asking for this feature, but then I said to myself: Hey, why not make a script? And so I've done one: /* switches circularly between lower case-UPPER CASE-Name Case (like in MS Word) */ var s = Document.SelText; if (s != "") { var ss = Document.SelStart; var sl = Document.S...
- 31 May 2012 07:31
- Forum: Syntax files
- Topic: The "Add/Remove Comment" command should use indention
- Replies: 3
- Views: 14598
Re: The "Add/Remove Comment" command should use indention
However, If I put Python's comment character (#) with "Add/Remove Comment", the code is def internet_on(x): try: response=urllib.urlopen(x) # response=urllib2.urlopen(x,timeout=y) return True except IOError as err: pass return False def other(x,y): Got it, thank you! So it seems that the ...
- 30 May 2012 08:29
- Forum: Syntax files
- Topic: The "Add/Remove Comment" command should use indention
- Replies: 3
- Views: 14598
Re: The "Add/Remove Comment" command should use indention
I don't quite understand. Say, I have this piece of code: if (isset($osSearchPresets['minlength'])) { // $minlength = $osSearchPresets['minlength']; $minlength = 5; } When I highlight it all and comment out, I get this: // if (isset($osSearchPresets['minlength'])) // { // // $minlength = $osSearchPr...
- 06 May 2012 20:04
- Forum: News
- Topic: Temporary break in development
- Replies: 6
- Views: 22702
Re: Temporary break in development
Howdy! Good to see you back :D
- 01 Apr 2012 12:28
- Forum: News
- Topic: Temporary break in development
- Replies: 6
- Views: 22702
Re: Temporary break in development
The place looks superb! I wish you good luck in your new neighborhood
(And who would think making freeware apps pays off this much? )
(And who would think making freeware apps pays off this much? )
- 28 Mar 2012 13:50
- Forum: Scripts
- Topic: WstringReplaceAll doesn't replace "
- Replies: 0
- Views: 7295
WstringReplaceAll doesn't replace "
This code works fine--unless you use """ (i.e. the entity) as a search term:
Code: Select all
Document.SelectAll;
s = Document.SelText;
s = ScriptUtils.WstringReplaceAll(s, """, "whatever");
Document.SelText = s;