Jump to content
Sign in to follow this  
UberFoX

AutoIt inspired Scripting language I'm making

Recommended Posts

UberFoX

Hello I want to start off by saying I have the greatest respect for AutoIt and its developer I've used it for many years and it's saved my ass countless times I've used it since the beginning infact and I have huge complex scripts to prove it such as Bots and all kinds of automation stuff (I can post if you want lol).

I love AutoIt but I always felt it was lacking certain features that I missed a lot from Perl/PHP/C#/C++ I tried using the AutoIt DLL to embed AutoIt into projects I was doing but I found the DLL deeply lacking and with a deep inability to customize the functions that DLL gives really upset me.

I decided to try make my own little script language to try bridge the gap between my favourite general programming language and AutoIt scripting a kind of glue if you will.

Evenutally it grew from being a simple glue to its own individual scripting language that handles every function internally and does not use anything from AutoIt.

It was not easy making such a complex language that would incorporate all the best stuff from AutoIt and all the best stuff from other languages I love such as classes/arrays from PHP, Regexes from Perl and so on.

The result of my work (the past 2 years of work infact) is Sputnik.

I have tried to make Sputnik as friendly for AutoIt users as possible (similar function names etc) so people can test stuff and see if they like/hate it.

Sputnik Scripting Language a simple easy to use beginner friendly language created to be have as much stuff from all my favourite languages as possible in one place.

This was made as a fun project to try produce a scripting language that did everything I need to do.

Sputnik is already proving to be a lot of fun and very easy to use and very powerful!
It is fully useable.

A list of some of the things Sputnik supports:
* Ability to make GUI programs that support infinite amounts of Windows running at once
* PHP Style syntax using curly braces {}
* Enums like C++
* Approx 700 functions, 50 or so operators and many casts
* Dynamically unload functions/classes from your running program and reload them back again from source code allowing full complete updates to the source of your program while it is still running
* Try/Catch/Finally with ability to create exceptions even extended ones using the internal class
* Can assign hotkeys to run scripts/functions anything they can be simple hotkeys or very complex hotkeys
* The $variable can be any of the following: char, bool, byte, sbyte, int16, int32, int64, uint16, uint32, uint64, float, double, string, array, ref
* Ability to make Macros to control Windows/Buttons/Objects/Mouse/Keyboard (Bascially like as AutoIt) can send text to applications etc etc
* Classes with ability to extend them and multiple inheritance every operator and cast can be overloaded in the Classes
* Multi-threading with ability to spawn/speed/kill threads and even define areas of code as Locked so stop two threads running it at once

* Can place $variables inside strings like "hello $name how are you"

* Can use all C++ escapes in the strings such as n and x etc etc

* Can use all Perl escapes in strings such as "Hello {msgbox('test')} ok" to run code inside strings
* Can make GUI programs with buttons and all kinds of stuff even MDI interfaces
* Very easy to use Array system that works exactly like PHPs no need to redim etc etc
* Support for calling DLL functions and even pass arrays as individual arguments and even inline C code directly into your script
* Perl style regexes using same syntax as Perl $var =~ //; etc
* Support for complex Parsers using Rules and Terminals (Sputnik's parser function can even be used to parse Sputniks own code)
* Type checking like $var ~~ Int32
* Binary features to handle Binary data with Pack() Unpack() (similar to PHP/Perl) and over 40 binary functions
* Stream functions similar to binary but faster if you want to do loads of appending/inserting
* Many math functions
* Around 60 string functions
* DLLCall can call single functions but DLLImport can load thousands at a time and even save them as newly compiled DLL for faster loading speed
* Can capture console output of executed third party programs
* Many file creation/read/write frunction
* Many directory/path functions
* Ability to create UDP/TCP raw sockets for creating client/server programs
* Includes an additional easy to use beginner friendly powerful internal Client/Server series of functions making producing client/servers a breeze
* Many memory read/write functions for Trainer creation and game hacking
* Many memory function to alloc, free, modify in many ways
* Get/Set clipboard data
* MsgBox/InputBox
* Can hook messages to improve your macros like mousehooking/keyhooking
* All the familure Win___() functions from AutoIt you would expect WinActive, WinList its all there
* All the Control___() functions from AutoIt you would expect
* Pixel functions such as searching for pixels on screen for creating AimBots
* Call functions by name with params or arrays of params
* Dynamically create source code/functions while your program is running and execute that code
* Dynamically create a function on a $variable and execute it like: $Func =  Function( $a, $b ){ println("Value is: " . ($a + $ [ B)] ); }; CallFunc($Func, array(10, 20));
* Ability to throw exceptions/die
* Ability to include/require and optionally once
* Opt() like AutoIt to set any options you desire like WinTitleMatchMode
* Comes with a small but growing library of functions/classes made in Sputnik that includes vector3 class, parses etc creating C dlls/exes etc

* Sputnik fully parses the scripts before it starts executing code so you dont *bump* into an error later you get it right in your face straight away.

* Supports global variables like: Global $value = "hello";

* Supports local variables like: my $value = "hello";

* Supports scoped variables inside braces if() { my $value = "hello"; }

* Supports Lists like:  List ($name, $id) = Split($str, '|');

and many many more.... see the wiki

I have created a wiki for Sputnik where I place all its functions and operators etc etc the link is:
http://uberfox.no-ip.org/Sputnik/wiki

The "Function Reference" page on the wiki contains every function found in Sputnik with example code you can copy and paste.

I would be happy if you could try it out and tell me if you like it or dont like it whatever I made it for myself and in the whole time it's existed only me and my friend have actually used it nobody else but I would like to see if anybody else is interested... Or not...

If you decide to take a look I would greatly appreciate bug reports and any advise/function requests you wish.

Sputnik is also available as a DLL that can be used from any program.

You can e-mail me at
uberfox@hotmail.com

 

EDIT ---- READ

Well I have received some PM's from the AutoIt staff and they have informed me that although I'm not breaking any rules by being here they do feel that I should rather have my own forum than to promote/track/update etc the status of Sputnik on this forum.

Which is perfectly understandable considering many languages have their own forums such as PHP, QuickMacros, AutoHotKey and what not.

I do wish to thank the staff at AutoIt for being kind and supportive of my project.

If people wish to continue talking about Sputnik I'm afraid you will need to do it at my forum the link is here:

http://uberfox.no-ip.org/forum

It is an old forum I had years ago I used it for my mods and other projects however I recently just deleted everything on it and did a general reset to get rid of all spam and put Sputnik on it well it should still work despite how old it is.

If you are having issues posting make sure to read the new member post:

http://uberfox.no-ip.org/forum/showthread.php?31307-Welcome-new-Members!

I will instantly promote anybody to full member who requests it.

Edited by UberFoX
  • Like 1

Share this post


Link to post
Share on other sites
FaridAgl

Damn! Is it real?! Am I dreaming?! It's 1:26 AM so I guess it's just a dream, but a good one!

Downloading, hope it wasn't a joke!

Share this post


Link to post
Share on other sites
UberFoX

Damn! Is it real?! Am I dreaming?! It's 1:26 AM so I guess it's just a dream, but a good one!

Downloading, hope it wasn't a joke!

 

It is real lol if you need any help let me know.

I forgot to mention it works best if you use Notepad++ and set the language syntax colouring to PHP.

Sputnik is designed to use PHP style stuff as much as possible so the syntax colours set to PHP looks great.

<?
println("Hello World!");
?>

Notice the <? and ?> at the beginning and end of the script? they are not need but help Notepad++ view Sputnik code as PHP of course Sputnik views <? and ?> as comments (along with /*  */ and // and #).

Edited by UberFoX

Share this post


Link to post
Share on other sites
czardas

It looks like a lot of work went into this. I'm not the person to give an appraisal because I'm not familiar with the subtleties of many other languages. I find AutoIt suits most of my needs. Thanks for sharing this all the same and I wish you luck with it.

Share this post


Link to post
Share on other sites
AdmiralAlkex

* Ability to make GUI programs that support infinite amounts of Windows running at once

* Supports infinite GUI windows at once (Where as AutoIt supports only one)

Saying it twice makes it more true? Makes what more true? AutoIt has no such limit on the amount of windows.

Unless this is a thinly veiled attempt to twice more telling us you have multi-threading... But why would you list that as a feature thrice?

Share this post


Link to post
Share on other sites
UberFoX

Saying it twice makes it more true? Makes what more true? AutoIt has no such limit on the amount of windows.

Unless this is a thinly veiled attempt to twice more telling us you have multi-threading... But why would you list that as a feature thrice?

 

More true? Every function I stated Sputnik does is exactly what it does. If you have any doubts feel free to try it yourself...

This isn't some large corporation that has people to go over every inch of text and make sure its perfect. No I wrote what I could think regardless if I added it twice or not. That's pretty irrelevent I bet there is many such spelling errors there and even words missing for no reason other than the individual who wrote it is tired.

You say AutoIt can spawn many GUIs at once? How exactly? I've wanted to do that for awhile but from what I can see you can only make one window at the time and all the functions you use link directly to that one window you created.

$msg = GUIGetMsg()
Local $gui = GUICreate("Background", 400, 100)
; background picture
GUICtrlCreatePic("..\GUI\msoobe.jpg", 0, 0, 400, 100)

Where exactly do you handle multiple GUIs?

In Sputnik for example you create a window like  $var = GUICreate("window", "My title", 200, 200);

Lets say you wanted to create a button

$btn = GUICreate("button", $var, "my text", 100, 100, 5, 5); // spawning the button on a specific window you want....

I couldn't see a way to do that in AutoIt (which is why I mentioned that in my original post) if that is possible then great since I did not see it which is exactly why I stated Multiple windows are handled properly in Sputnik.

A simple Sputnik GUI with a button

// Create the GUI
$GUI = GUICreate("Window", "Hello", 200, 200);
// Show the GUI
GUILoad( $GUI );
// Create a button -- This button will simply display a message
$Button = GUICreate("Button", $GUI, "Press Me!", 8, 8);
// Add a link to the button
GUILink($Button, "Click", 'doSomething();'); // Call function
// Keep the GUI running as long as long as the window is open
While ( GUIStatus( $GUI ) ) DoEvents( );

Function doSomething()
{
    MsgBox("Hello from button you clicked me");
}

As you can see the window and even the buttons have their own variable so creating infinite amounts of windows is non-trivial.

My guess is (must) AutoIt maybe has Library functions to handle the multiple GUIs since I could not find a way to make its normal GUICreate() stuff do it...

But none of this is irrelevent this isn't a competition if AutoIt is the best tool for you then keep using your best tool.

I made Sputnik since its the best tool for me and from my point of view it extended the functionality that AutoIt offered which I needed badly.

There are many things AutoIt cant do that Sputnik can do and there are many things that AutoIt can do that Sputnik cant do.

Its all about using the right tool for the job at hand I made this as my personal project its not some companies product its not got a price tag on it its my hobby I'm sharing it because this is what it was born from if you don't like that then you dont have to be in this topic looking here do you? Nobody is forcing you to be here. This is the development board for people to post their developments.

Edited by UberFoX

Share this post


Link to post
Share on other sites
Edano

well i am an idiot and don't have much understanding of autoit, but doesn't your sputnik example simply represent the GUI on Event Mode in autoit ?

E.

  • Like 1

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites
UberFoX

well i am an idiot and don't have much understanding of autoit, but doesn't your sputnik example simply represent the GUI on Event Mode in autoit ?

E.

 

Personally I don't know since I haven't used AutoIt in 3 years Sputnik isn't using events though its using Classes.

Here is code that makes 2 windows each one with a button to press.

 

// Create the GUI

$GUI = GUICreate("Window", "Hello", 200, 200);

$AnotherGui = GUICreate("Window", "Hello", 200, 200);

// Show the GUI

GUILoad( $GUI );

GUILoad( $AnotherGui );

// Create a button -- This button will simply display a message

$Button = GUICreate("Button", $GUI, "Press Me!", 8, 8);

$Button2 = GUICreate("Button", $AnotherGui, "Press Me!", 8, 8); // make button on second window

// Add a link to the button

GUILink($Button, "Click", 'doSomething();'); // Call function

GUILink($Button2, "Click", 'doSomething2();'); // Call function

// Keep the GUI running as long as long as the window is open

While ( GUIStatus( $GUI ) && GUIStatus( $GUI ) ) DoEvents( );

Function doSomething()

{

    MsgBox("Hello from button you clicked me");

}

Function doSomething2()

{

    MsgBox("Hello from button on other window you clicked me");

}

Edited by UberFoX

Share this post


Link to post
Share on other sites
Edano

what's the point ?

.

Opt("GUIOnEventMode",1)

For $i=1 To 100
    GUICreate("Hello",200,200)
    GUICtrlCreateButton("Press Me",8,8)
    GUICtrlSetOnEvent(-1,"doSomething")
    GUISetState()
Next

While Sleep(20)
WEnd

Func doSomething()
    MsgBox(0,"","Hello from Button "&@GUI_CtrlId&" you clicked me")
EndFunc

.

this makes 100 guis with a button. without library.

Edited by Edano
  • Like 1

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites
UberFoX

what's the point ?

.

Opt("GUIOnEventMode",1)

For $i=1 To 100
    GUICreate("Hello",200,200)
    GUICtrlCreateButton("Press Me",8,8)
    GUICtrlSetOnEvent(-1,"doSomething")
    GUISetState()
Next

While Sleep(20)
WEnd

Func doSomething()
    MsgBox(0,"","Hello from Button "&@GUI_CtrlId&" you clicked me")
EndFunc

.

this makes 100 guis with a button. without library.

 

Great its nice that works but what if you want them in an array?

my $WindowList = array();
for($i = 0; $i < 100; $i++)
{
    my $GUI = GUICreate("Window", "Window $i", 200, 200);
    GUILoad( $GUI );
    $Button = GUICreate("Button", $GUI, "Press Me!", 8, 8);
    $Button2 = GUICreate("Button", $GUI, "Press Me!", 28, 28);
    GUILink($Button, "Click", "doSomething($i);");
    GUILink($Button2, "Click", "msgbox('Hello im button $i');");    
    $WindowList[] = $GUI; // Add the gui to array
}

while(true) DoEvents();

Function doSomething($id)
{
    MsgBox("Hello $id from button you clicked me");
}

What if an array isnt good enough and you want to use Classes to maybe inheritence or multiple inheritance?

Class Window // Could multiple inherit
{
    my $Name;
    my $GUI;
    my $Button;
    Function __Construct($Name)
    {
        $this->$Name = $Name;
        $GUI = GUICreate("Window", $Name, 200, 200);
        GUILoad( $GUI );
        $Button = GUICreate("Button", $GUI, "Press Me!", 8, 8);
        GUILink($Button, "Click", '$param->doSomething($i, $param->name);', $this);
    }
    Function doSomething($id, $name)
    {
        msgbox("(internal) Hello from button '$id' of window '$name'");
        DoSomethingElse($id, $name);
    }
        //; we could add tons of functions and casting overloads and operator overloads here to do all kinds of stuff
};


my $WindowList = array();
for($i = 0; $i < 100; $i++)
    $WindowList[] = new Window("My Window");


Function DoSomethingElse($id, $name)
{
    msgbox("Hello from button '$id' of window '$name'");
    DoSomethingEles($id, $name);
}

Its about what do you need? I needed classes and object orientated programmed without needing some special opt that nobody will find easily...

If what you need is fulfilled with what you use then thats great you can be happy.

I will use AutoIt if it does something I need that Sputnik isnt currently doing and I will use AutoHotKey if that does something I need that either will do.

I will use C++ to do something that NONE of the above can do.

And lastly I will use Assembly to do stuff that NONE of the above can do.

I will pick the correct tool for the job at hand I made Sputnik to fill a void I had and bridge a gap between a bunch of languages to save me making a messy project wether its any use to you? Who knows? Maybe not or maybe there is something sometime it might prove useful to you maybe maybe not.

No language is *best* there is no such thing as a best programming/script/macro language there are just languages where certain things are easier to do and other things are harder to do like I found Arrays in AutoIt pretty annoying so when I made Sputnik I made the arrays extremely easy to use.

(The arrays are also dictionaries $var["Test"] = "Hello"; is just as valid as $var[5] = "Test"; with no need to ever dim or redim same as PHP (arrays from php can be copied and pasted into sputnik with almost no change well at the most you need to remove a , from the end other than that you can copy and paste arrays from PHP))

As shown in:

http://uberfox.no-ip.org/Sputnik/wiki/index.php/Language_Reference#Arrays

Edited by UberFoX

Share this post


Link to post
Share on other sites
Edano

Great its nice that works but what if you want them in an array?

.

Opt("GUIOnEventMode",1)

Global $gui[100],$button[100],$button2[100]

For $i=1 To 100
    $gui[$i-1]=GUICreate("Hello "&$i-1,200,200,Random(100,1000,1),Random(100,500,1))
    $button[$i-1]=GUICtrlCreateButton("Press Me",8,8)
    GUICtrlSetOnEvent(-1,"doSomething")
    $button2[$i-1]=GUICtrlCreateButton("Press Me",28,28)
    GUICtrlSetOnEvent(-1,"doSomething")
    GUISetState()
Next

While Sleep(20)
WEnd

Func doSomething()
    MsgBox(0,"","Hello from Button "&@GUI_CtrlId&" you clicked me")
EndFunc

.

so why do you make such a statement ?

.

* Ability to make GUI programs that support infinite amounts of Windows running at once

* Supports infinite GUI windows at once (Where as AutoIt supports only one)

 .

without needing some special opt that nobody will find easily...

.

you do not even need "some special opt that nobody will find easily..."

.

Global $gui[100],$button[100],$button2[100]

For $i=1 To 100
    $gui[$i-1]=GUICreate("Hello "&$i-1,200,200,Random(100,1000,1),Random(100,500,1))
    $button[$i-1]=GUICtrlCreateButton("Press Me",8,8)
    $button2[$i-1]=GUICtrlCreateButton("Press Me",28,28)
    GUISetState()
Next

While 1
    $msg=GUIGetMsg()
    For $i=0 To 99
        If $msg=$button[$i] Then doSomething($i*2)
        If $msg=$button2[$i] Then doSomething($i*2+1)
    Next
WEnd

Func doSomething($i)
    MsgBox(0,"","Hello from Button "&$i&" you clicked me")
EndFunc
Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites
UberFoX

.

Opt("GUIOnEventMode",1)

Global $gui[100],$button[100],$button2[100]

For $i=1 To 100
    $gui[$i-1]=GUICreate("Hello "&$i-1,200,200,Random(100,1000,1),Random(100,500,1))
    $button[$i-1]=GUICtrlCreateButton("Press Me",8,8)
    GUICtrlSetOnEvent(-1,"doSomething")
    $button2[$i-1]=GUICtrlCreateButton("Press Me",28,28)
    GUICtrlSetOnEvent(-1,"doSomething")
    GUISetState()
Next

While Sleep(20)
WEnd

Func doSomething()
    MsgBox(0,"","Hello from Button "&@GUI_CtrlId&" you clicked me")
EndFunc

.

so why do you make such a statement ?

.

 

That's because to the BEST of my knowledge I was only ever able to make one WINDOW at a time in AutoIt I was not being misleading.

If I could edit the post I would have fixed it a LONG time ago.

I dont see why you are making it into a competition? It's not hell Sputnik is only 28% complete if you dont like it then you dont need to be here... I do appeciate finding out AutoIt can do multiple Windows but you are turning this into a *code battle* and i dont see why I was happy enough just knowing AutoIt CAN do the multiple windows.

I cannot edit the post and change what it said it wont even let me so no amount of code spamming is going to fix that.

Yea I know AutoIt can use arrays (although the ones you showed were fixed size where as the one i showed grows in size as the [] = adds new indexes automatically).

I made a GUI Builder made in Sputnik for making Sputnik GUIs its not finished yet but it makes extensive use of classes and multiple windows in an MDI interface.

Since you seem good at coding how would you like to take a look at help out ? You might find Sputnik isnt that bad.

Snippet from the GUI Builder

It even draws its own grid

<?
DLLStructCreateDef('WindowPos', 
                            @"
                            ptr hwnd;
                            ptr hwndInsertAfter;
                            int x;
                            int y;
                            int cx;
                            int cy;
                            uint flags
                            ");
Object::$Names[ObjectType->$Window] = 'Window';
Object::$Props[ObjectType->$Window] = array(
                                                'Width' => PropType->$Int,
                                                'Height' => PropType->$Int,
                                                'Text' => PropType->$Text,
                                                'BackColor' => PropType->$Colour
                                            );
Class Window extends Object
{
    my $Gripper;
    my $Grid;
    my $GridWidth;
    my $GridHeight;
    Function __construct($Name)
    {
        CreateContainer();
        SetName($Name);
        SetType(ObjectType->$Window);
        SetObject(GUICreate('Window', 'New Window', 320, 240, 0, 0));
        SetLinkMouseDown();
        GUIMDIParent(GetObject(), $GUI);
        $this->$Gripper = new Gripper(GetObject());
        // Add a MsgFilter to lock window at top corner
        GUIWndProc(GetObject(), '$param->DesignWndProc($hwnd, $lparam, $wparam, $msg);', $this);
    }
    Function __destruct()
    {
        GUIUnload( GetObject() );
    }
    Function Show()
    {
        GUILoad( GetObject() );
    }
    Function DesignWndProc($hwnd, $lparam, $wparam, $msg)
    {
        switch($MSG)
        {
            case 0x0046: # WM_WINDOWPOSCHANGING
                $Struct = PTRToDLLStruct('WindowPos', $LParam);
                DLLStructSetData($Struct, 'x', 0);
                DLLStructSetData($Struct, 'y', 0);
                break;
            case 0x0F:  # WM_PAINT
                DrawGrid();
                break;
        }
        return 0;
    }
    Function DrawGrid( )
    {
        my $Obj = GetObject();
        my $Width = GUIGetProp(GetObject(), 'Width');
        my $Height = GUIGetProp(GetObject(), 'Height');
        if($GridHeight < $Height || $GridWidth < $Width)
        {
            my $Colour = Colour('Black');
            $Grid = BitmapCreate($Width, $Height);
            for($j = 0; $j < $Width; $j += Utils::$GridSpaces)
                for($i = 0; $i < $Height; $i += Utils::$GridSpaces)
                    BitmapSetPixel($Grid, $j, $i, $Colour);
            $GridHeight = $Height;
            $GridWidth = $Width;
        }
        PSet($Obj, 0, 0, $Grid);
    }
};
?>
Object::$Names[ObjectType->$Button] = 'Button';
Object::$Props[ObjectType->$Button] = array(
                                                'Left' => PropType->$Int,
                                                'Top' => PropType->$Int,
                                                'Width' => PropType->$Int,
                                                'Height' => PropType->$Int,
                                                'Text' => PropType->$Text,
                                                'BackColor' => PropType->$Colour,
                                                'ForeColor' => PropType->$Colour
                                            );
Object::$MenuAdd[ObjectType->$Button] = GUICreate('MenuItem', $mObjects, 'Add ' . Object::$Names[ObjectType->$Button]);
GUILink(Object::$MenuAdd[ObjectType->$Button], 'Click', 'CreateControl(ObjectType->$Button);');
Class Button extends Object
{
    Function __construct($myParent, $Name, $Text = 'New ' . Object::$Names[ObjectType->$Button], $Left = 8, $Top = 8, $Width = 110, $Height = 25)
    {
        CreateParent($myParent);
        SetType(ObjectType->$Button);
        SetName($Name);
        SetObject(GUICreate('Button', $myParent->GetObject(), $Text, $Left, $Top, $Width, $Height));
        SetLinks();
    }
    Function __destruct()
    {
    }
};
<?
enum ObjectType
{
    $Window,
    $Button,
    $TextBox,
    $TextBoxEx,
    $Label,
    $GroupBox,
    $ComboBox,
    $ListBox,
    $TabSheet,
    $TabPage
};
enum PropType
{
    $Int,
    $Float,
    $Text,
    $ItemsLB,
    $ItemsCB,
    $Colour,
    $Tabs
};
Class Object
{
    my $Name;
    my $Type;
    my $Object;
    my $MoveData;
    my $Container;
    my $Parent;
    my $ParentOffset;
    my $Changed = array();
    Static $Props = array();
    Static $Names = array();
    Static $MenuAdd = array();
    Function __construct()
    {
    }
    Function __destruct()
    {
    }
    Function SetName( $t ) { $this->$Name = $t; }
    Function SetObject( $t ) { $this->$Object = $t; }
    Function SetType( $t ) { $this->$Type = $t; }
    Function GetName( ) { return $this->$Name; }
    Function GetObject( ) { return $this->$Object; }
    Function GetType( ) { return $this->$Type; }
    // Special changed modify used only for a few things such as colour
    Function SetChanged( $t, $v = true ) { $Changed[$t] = $v; }
    Function IsChanged( $t ) { return isKeySet($Changed, $t) && $Changed[$t] == true; }
    // Containers
    Function CreateContainer( ) { $this->$Container = new Container($this); }
    Function GetContainer( ) { return $this->$Container; }
    Function HasContainer( ) { return $this->$Container Is Container; }
    // Parent
    Function CreateParent( Object $Parent ) { $this->$Parent = $Parent; }
    Function GetParent( ) { return $this->$Parent; }
    Function HasParent( ) { return isVarClass($this->$Parent); }
    // Parent Offset
    Function CreateParentOffset( $Top, $Left ) { $this->$ParentOffset = array($Top, $Left); }
    Function GetParentOffset( ) { return $this->$ParentOffset; }
    Function HasParentOffset( ) { return isVarArray($this->$ParentOffset); }
    Function SetLinks ( )
    {
        SetLinkMouseDown();
        SetLinkMouseUp();
        SetLinkMouseMove();
    }
    Function SetLinkMouseDown ( )
    {
        GUILink($Object, 'MouseDown', '$param->onMouseDown($arg);', $this);
    }
    Function SetLinkMouseUp ( )
    {
        GUILink($Object, 'MouseUp', '$param->onMouseUp($arg);', $this);
    }
    Function SetLinkMouseMove ( )
    {
        GUILink($Object, 'MouseMove', '$param->onMouseMove($arg);', $this);
    }
    Function onMouseMove ( $arg )
    {
        unless($MoveData) return;
        if(isVarArray($MoveData))
        {
            my List($OldX, $OldY,  $objX, $objY) =  $MoveData
            
            my $newX = $arg[0];
            my $newY = $arg[1];
            
            my $Top = GUIGetProp($Object, 'Top');
            my $Left = GUIGetProp($Object, 'Left');
            my $Width = GUIGetProp($Object, 'Width');
            my $Height = GUIGetProp($Object, 'Height');
            
            my $LastObjTop = Utils::SnapToGrid($Top + $newY - $OldY);
            my $LastObjLeft = Utils::SnapToGrid($Left + $newX - $OldX);
            
            my $gui = $Windows[$CurrentWindow]->$Object;
            
            If($LastObjLeft > 0 && ($LastObjLeft + $Width) < GUIGetProp($gui, 'Width'))
                GUISetProp($Object, 'Left', $LastObjLeft);
            If($LastObjTop > 0 && ($LastObjTop + $Height) < GUIGetProp($gui, 'Height'))
                GUISetProp($Object, 'Top', $LastObjTop);
                
            AttachControl($this);
        }
    }
    Function onMouseUp ( $arg )
    {
        unset( $MoveData );
    }
    Function onMouseDown ( $arg )
    {
        my $objX = GUIGetProp($Object, 'Left');
        my $objY = GUIGetProp($Object, 'Top');
        my $OldX = $arg[0];
        my $OldY = $arg[1];
        $this->$MoveData = array($OldX, $OldY,  $objX, $objY);
        AttachControl($this);
    }
    Function onGripperAttach ( )
    {
        GUIDataGrid($PropertiesWindow->$Data, 'Clear');
        GUIDataGrid($PropertiesWindow->$Data, 'SetColumns', array('Key', 'Value'));
        GUIDataGrid($PropertiesWindow->$Data, 'AddRow', array('Name', GetName()));
        foreach(Object::$Props[GetType()] as my $PName => my $PType)
        {
            Switch ($PType)
            {
                case PropType->$Int:
                {
                    GUIDataGrid($PropertiesWindow->$Data, 'AddRow', array($PName, GUIGetProp($Object, $PName)));
                }
                break;
                case PropType->$Float:
                {
                    GUIDataGrid($PropertiesWindow->$Data, "AddRow", array($PName, GUIGetProp($Object, $PName)));
                }
                break;
                case PropType->$Text:
                {
                    GUIDataGrid($PropertiesWindow->$Data, "AddRow", array($PName, GUIGetProp($Object, $PName)));
                }
                break;
                case PropType->$ItemsLB:
                {
                    GUIDataGrid($PropertiesWindow->$Data, "AddRow", array($PName, '[ITEMS]'));
                }
                break;
                case PropType->$ItemsCB:
                {
                    GUIDataGrid($PropertiesWindow->$Data, "AddRow", array($PName, '[ITEMS]'));
                }
                break;
                case PropType->$Colour:
                {
                    GUIDataGrid($PropertiesWindow->$Data, "AddRow", array($PName, '[COLOUR]'));
                }
                break;
                case PropType->$Tabs:
                {
                    GUIDataGrid($PropertiesWindow->$Data, "AddRow", array($PName, '[TABS]'));
                }
                break;
            }
        }
    }
};
?>
Edited by UberFoX

Share this post


Link to post
Share on other sites
Edano

no, i did not make a competition, you did. and you made false statements and comparisms that i corrected. nothing else i did.

anyway, good luck for your scripting language

E.

and thank you for calling me a good coder. usually they call me here a bad coder without any knowledge. i will surely take a look at your project.

Edited by Edano

[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites
UberFoX

no, i did not make a competition, you did. and you made false statements that i corrected. nothing else i did.

anyway, good luck for your scripting language

E.

 

It wasn't intentional I posted what I knew from my own experiance with AutoIt and the Bots and Scripts ive made using AutoIt.

(I'm not sure how saying something you think is true but turns out not to be is making a competition? hmm thats like somebody posting C++ on a usenet many years ago and making one booboo about Pascal and getting railed over it yet everybody forgets he was taking about C++ anyway does not matter I dont expect anybody to bother I more or less expected an instant ban (like ive seen happen to somebody who mentioned autohotkey) as i said i made this for myself by myself if anybody wants to try it than ok great go ahead but im not gonna make a big deal over that or lack of that. As i said earlier you use the tool that suits you. If nobody ever shared their personal project you wouldnt have perl/php and many many others... ).

Since new users can only make 9 posts in first day I cannot continue making posts its a shame I had to waste so many for no big reason but thats just how it goes I guess.

For anybody who is interested the wiki has all the information

http://uberfox.no-ip.org/Sputnik/

Direct download link

http://uberfox.no-ip.org/Sputnik14.zip

My e-mail

uberfox@hotmail.com

I am interested in bug reports and general testing and feature requests or feature change ideas etc.

It would also be nice if somebody wants to help complete the GUI Builder (its made in Sputnik itself) and a bunch of other tools and of course help out making library functions.

(Im too busy coding the core to do these things but I have made an effort on everything)

Edited by UberFoX

Share this post


Link to post
Share on other sites
Edano

we could both be banned tomorrow :)


[color=rgb(255,0,0);][font="'comic sans ms', cursive;"]FukuLeaks[/color][/font]

Share this post


Link to post
Share on other sites
TheSaint

@UberFox - Usually you need to have made X amount of posts before you can see do things. You may be able to edit your post before long. If not then request a MOD to allow you.

Impressive amount of work you've put in, and mistakes with claims etc aside, I applaud you.

Personally I'm happy enough with AutoIt as it has been for some time, but I know for a fact that several here look beyond it, and see AutoIt as a stepping stone, even though they still hang here. They will surely enjoy checking out what you have generously provided. No doubt others will be curious too.

Thanks and Cheers to you ... keep being the individual you are, and don't let others put you off.

I can only imagine the amount and effort you have gone to, which surely deserves plenty of kudos, and I know some here, will definitely feel the same.


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
TheSaint

Further to the above.

Being a weekend (mid Sunday here), it may be a while before most see your topic.


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
Melba23

UberFoX,

Welcome to the AutoIt forum. :)

I have lifted your "New Member" posting restriction - and with your current post count you should also have "Edit" permissions now (the button should appear at bottom right of the post). And could I remind people about this announcement. Here is a perfect example where we would be happy to help - if someone lets us know that we need to. ;)

Please forgive the aggressive tone taken by Edano - I hope that his intervention was a clumsy attempt to defend AutoIt against your mistaken interpretation of some of it's capabilities rather than a direct attack on your project. I am sure the majority of members will be very interested in seeing what is obviously the result of a great deal of work on your part. :)

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×