AGo’s Tools
"AGo's Tools" is a small plugin that adds a few features that I think SWF Studio lacks.
Currently there are not very many functions in it, but if you could think of something handy to add feel free to contact me and I'll see if I can implement it.
Download
You'll want to get
- The Plugin itself (current version 3.00.0000, 6.1.06)
- a sample project which shows all commands (Flash 8 )
Simply put the DLL file into your SWF Studio\plugins folder, it should then appear on the Plugin Tab where you can select it.
Command Reference
There is no real documentation yet (and probably won´t be) so here are all commands currently available.
sleep
I really missed that in AS, altough you probably never need it
This command will let your script wait for a specific amount of time, without consuming CPU cycles. You only pass it the ms time you want it to sleep
-
sleep_btn.onRelease = function() {
-
ssCore.AGosTools.sleep({ms:3000});
-
_root.out_txt.text += "\n... and I´m back!";
-
};
findWindow
An addition to SWF Studio's Window command. Pass it the title of a window and you'll get the window handle back to access that window. Note that you need to know the full title, not only a part of it.
-
findWindow_btn.onRelease = function() {
-
var result_obj = ssCore.AGosTools.findWindow({title:" SWF Studio Professional Edition 3.3 - untitled "});
-
if (result_obj.success) {
-
var hwnd = parseInt(result_obj.result);
-
if (hwnd>0) {
-
//We found a window
-
_root.out_txt.text = "Found window at "+hwnd;
-
} else {
-
//No window found
-
_root.out_txt.text = "I´m sorry, no match,...";
-
}
-
}
-
};
moveWindow
resizeWindow
These functions are the same as Studio`s, but they allow you to move other windows by passing their window handle. You need to find these out with findWindow first.
-
move_btn.onRelease = function() {
-
var out_obj = ssCore.AGosTools.moveWindow({hwnd:_root.moveHWND_txt.text, x:40, y:40});
-
if (!out_obj.success) {
-
_root.out_txt.text = "Move failed:\nSWF Studio error\n"+out_obj.Error.description+" (Code "+out_obj.Error.code+")";
-
}
-
};
-
//
-
resize_btn.onRelease = function() {
-
var out_obj = ssCore.AGosTools.resizeWindow({hwnd:_root.resizeHWND_txt.text, width:230, height:430});
-
if (!out_obj.success) {
-
_root.out_txt.text = "Resize failed:\nSWF Studio error\n"+out_obj.Error.description+" (Code "+out_obj.Error.code+")";
-
}
-
};
Known Limitations
moveWindow and resizeWindow freeze if you pass them the hwnd of your own Application, so simply use SWF Studio´s ssCore.Window commands for that purpose.