Author Topic: ScriptCore auto-completion for Notepad++  (Read 2674 times)

0 Members and 1 Guest are viewing this topic.

Offline JotEmI

  • Soldier
  • **
  • Posts: 188
ScriptCore auto-completion for Notepad++
« on: May 20, 2011, 08:38:54 am »
As you may know Notepad++ supports not only syntax highlighting but also auto-completion and calltips. I've made Notepad++ auto-completion file for Soldat ScriptCore.

Just extract the file to your 'Notepad++ folder\plugins\APIs' and enable Auto-Completion in Notepad++ preferences (Settings->Preferences->Backup/Auto-Completion). Check 'Enable auto-completion on each input', 'Function completion' and 'Function parameters hint on input'.

My API supports all the ScriptCore v2.6.5 variables, functions and events, MSAC ScriptCore extension procedures and most of supported Pascal functions.
« Last Edit: May 29, 2011, 06:37:17 am by JotEmI »

DarkCrusade

  • Guest
Re: ScriptCore auto-completion for Notepad++
« Reply #1 on: May 20, 2011, 09:04:17 am »
Wow, this'll definetly come in handy! Thanks :)

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: ScriptCore auto-completion for Notepad++
« Reply #2 on: May 20, 2011, 10:01:45 am »
* FalconPL votes for sticky
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: ScriptCore auto-completion for Notepad++
« Reply #3 on: May 20, 2011, 07:18:26 pm »
I'm sure many of us appreciate this. Thank you! I didn't even know Notepad++ had auto-completion! I guess you learn something new every day. I just tested it, sweetness!

From: May 20, 2011, 07:43:31 pm
Check SetArrayLength. More specifically, its NewLength paramter's type. Same for SetLength. They are of type string, where I expected some integral type.
« Last Edit: May 20, 2011, 07:44:36 pm by DorkeyDear »

Offline JotEmI

  • Soldier
  • **
  • Posts: 188
Re: ScriptCore auto-completion for Notepad++
« Reply #4 on: May 20, 2011, 08:06:55 pm »

From: May 20, 2011, 07:43:31 pm
Check SetArrayLength. More specifically, its NewLength paramter's type. Same for SetLength. They are of type string, where I expected some integral type.

Thx, indeed they were supposed to be integer type. Fixed version in first post.
Btw. I didn't know Notepad++ had auto-completion either, I've just learnt about it two days ago.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: ScriptCore auto-completion for Notepad++
« Reply #5 on: May 20, 2011, 08:09:40 pm »
I didn't check through to see if these all exist, but I figure this list may be of use for you:
Quote
function inttostr(i: Int64): string;
function inttostr(i: Integer): string;
function strtoint(s: string): Longint;
function strtointdef(s: string; def: Longint): Longint;
function copy(s: string; ifrom, icount: Longint): string
function pos(substr, s: string): Longint;
procedure delete(var s: string; ifrom, icount: Longint);
procedure insert(s: string; var s2: string; ipos: Longint);
function getarraylength: integer;
Function StrGet(var S : String; I : Integer) : Char;
procedure StrSet(c : Char; I : Integer; var s : String);
Function WStrGet(var S : WideString; I : Integer) : WideChar;
procedure WStrSet(c : WideChar; I : Integer; var s : WideString);
Function StrGet2(S : String; I : Integer) : Char;
Function AnsiUppercase(s : string) : string;
Function AnsiLowercase(s : string) : string;
Function Uppercase(s : string) : string;
Function Lowercase(s : string) : string;
Function Trim(s : string) : string;
function Length(s : string) : Integer;
procedure SetLength;
function Low: Int64;
function High: Int64;
procedure Dec;
procedure Inc;
Function Sin(e : Extended) : Extended;
Function Cos(e : Extended) : Extended;
Function Sqrt(e : Extended) : Extended;
Function Round(e : Extended) : Longint;
Function Trunc(e : Extended) : Longint;
Function Int(e : Extended) : Extended;
Function Pi : Extended;
Function Abs(e : Extended) : Extended;
function StrToFloat(s: string): Extended;
Function FloatToStr(e : Extended) : String;
Function Padl(s : string;I : longInt) : string;
Function Padr(s : string;I : longInt) : string;
Function Padz(s : string;I : longInt) : string;
Function Replicate(c : char;I : longInt) : string;
Function StringOfChar(c : char;I : longInt) : string;
function Unassigned: Variant;
function VarIsEmpty(const V: Variant): Boolean;
function Null: Variant;
function VarIsNull(const V: Variant): Boolean;
function VarType(const V: Variant): TVarType;
procedure RaiseLastException;
procedure RaiseException(Ex: TIFException; Param: string);
function ExceptionType: TIFException;
function ExceptionParam: string;
function ExceptionProc: Cardinal;
function ExceptionPos: Cardinal;
function ExceptionToString(er: TIFException; Param: string): string;
function StrToInt64(s: string): int64;
function Int64ToStr(i: Int64): string;
function SizeOf: Longint;
function IDispatchInvoke(Self: IDispatch; PropertySet: Boolean; const Name: String; Par: array of variant): variant;

type
  IDispatch
  IUnknown

function GetTickCount(): cardinal;
function CheckWeaponAllowed(WeaponNum: byte): boolean;
function Chr(Character: byte): char;
function LogN(base, value:Extended):Extended;
function StrPos
Not all the necessary information is provided (some of them don't have parameters given), but at least it's a list.

Offline JotEmI

  • Soldier
  • **
  • Posts: 188
Re: ScriptCore auto-completion for Notepad++
« Reply #6 on: May 20, 2011, 08:12:50 pm »
Already seen it, most of that functions are supported by my auto-completion file. I've skipped all those Exception* (does anybody use them??) and some other functions that I couldn't find any decent info on.

From: May 21, 2011, 11:01:08 am
Update
- fixed few more typos and misspellings
- added 'procedure' and 'function' identifiers

Download in first post.
« Last Edit: May 21, 2011, 11:01:08 am by JotEmI »

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: ScriptCore auto-completion for Notepad++
« Reply #7 on: May 21, 2011, 12:38:36 pm »
I've actually had uses for those exception-related functions; rarely, but still.

Offline JotEmI

  • Soldier
  • **
  • Posts: 188
Re: ScriptCore auto-completion for Notepad++
« Reply #8 on: May 23, 2011, 09:44:44 am »
Fine, I'll add them in next version, specially for you :P

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: ScriptCore auto-completion for Notepad++
« Reply #9 on: May 23, 2011, 09:48:44 am »
i use them sometimes too, though i have already made set of functions to handle them
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline JotEmI

  • Soldier
  • **
  • Posts: 188
Re: ScriptCore auto-completion for Notepad++
« Reply #10 on: May 29, 2011, 06:37:32 am »
Update

- added remaining functions from the list provided by DorkeyDear (most without description as I couldn't find any)
- added overloads for functions that return variant types