Jump to content

Recommended Posts

Posted

Amazing! :unsure:

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted (edited)

If this is capable of what I think it's capable of, then: Way Hey! :unsure:

This reminds me on one episode of Malcolm in the Middle when he's babysitting this old lady with broken arm. She falls asleep at some point and he invites his geeks over knowing she'll be sleeping for few hours. One "tough" geek says something like: "Do you guys think what I think?", they all go "Yeahhhh!!!".

...If you ever see me laughing with no reason, it's probably because I remembered the next scene from that episode. OMG hilarious! :> It's completely above me. Needless to say, they didn't think what he thought.

I've added c# example. First post.

Edited by trancexx

♡♡♡

.

eMyvnE

Posted

CoGetObject. :unsure:

The code is beautiful.

Could be reduced to:

object myAu3Object = Marshal.BindToMoniker("AutoIt.Application");
;...
Would that be more correct?

♡♡♡

.

eMyvnE

Posted

...If you ever see me laughing with no reason, it's probably because I remembered the next scene from that episode. OMG hilarious! :> It's completely above me. Needless to say, they didn't think what he thought.

Hmm unfortunately I'm not familiar with the episode, so I'll have to imagine what the others were thinking. On the other hand, Access AutoIt may do much more than I think it does. Either way I like the examples. :unsure:
Posted

Could be reduced to:

object myAu3Object = Marshal.BindToMoniker("AutoIt.Application");
;...
Would that be more correct?

Native .NET calls are preferred over WinAPI / external calls for a number of reasons. Even if it's just a wrapper around an external call.
Posted (edited)

@trancexx

This is great !

Now AutoIT has a bi-directional COM approach, which is a new milestone. Very nice implementation indead :unsure:

Here is the Powershell example tested on windows 7 - X64.

# No GetObject in Powershell !! 
# http://technet.microsoft.com/en-us/library/ee176862.aspx
cls

# AutoIT Object instantition
[reflection.assembly]::LoadWithPartialName("'Microsoft.VisualBasic")
$oAutoIt = [Microsoft.VisualBasic.Interaction]::GetObject("AutoIt.Application")
$oAutoItType = $oAutoIt.GetType() 

$im = [reflection.bindingflags]::InvokeMethod
$gp = [reflection.bindingflags]::GetProperty 

$oAutoItType.InvokeMember("Call", $im, $null, $oAutoIt, ("ToolTip", "Some cool text",600, 300))
#$oAutoItType.InvokeMember("Call", $im, $null, $oAutoIt, ("Beep", 500, 700))
$oAutoItType.InvokeMember("Call", $im, $null, $oAutoIt, ("Sleep", "2000"))
$oAutoItType.InvokeMember("Call", $im, $null, $oAutoIt, ("ToolTip", ""))

So the only thing that leaves a black spot on AU3 is that it can't access Powershell or .Net classes.

Ps:

Forgot to mention save this example as .PS1 file and you can run this on any windows 7 OS natively.

Don't need to install any additional software dev. environment.

Rgds,

ptrex

Edited by ptrex
Posted (edited)

@trancexx

This is pretty damn awesome! :unsure:

Here's a Python example

(needs pywin32)

import win32com.client

try:
    oAutoIt = win32com.client.GetObject("AutoIt.Application")
    oAutoIt.Call("Tooltip", "Some cool text")
    oAutoIt.Call("Beep", 500, 700)
    oAutoIt.Call("Sleep", 3000)
    oAutoIt.Call("Tooltip", "")

    if oAutoIt.Call("MsgBox", 4 + 48 + 262144, "?", "Kill Server?") == 6:
        oAutoIt.Quit
except:
    print ("+Ermmm... is server script running?")   #Lets have a green output on this example (SciTE)

Edit: Updated example to work on both Python 2 and 3 (tested on 2.6.5 and 3.2)

Edited by AdmiralAlkex
Posted

50 thumbs up, then some more. You make me wish I had thought of it first every time you post something mate, absolutely fantabulous.

[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Posted

Yes, your COMlet (Autolet?) way works very good.

:unsure:

and make a simple (the most basic) COM server that exports almost the whole AutoIt functionality to anyone wanting to use it.

Have you thoughts about WEB server creation like your AutoItServer.au3?

So the only thing that leaves a black spot on AU3 is that it can't access Powershell or .Net classes.

You have to build COMlet way (through ROT) from Powershell with help of new AutoIt facility, I think

The point of world view

Posted (edited)

In the scripting language LUA is closed with an error. :unsure:

require("luacom")
oAutoIt = luacom.GetObject("AutoIt.Application")
print(oAutoIt)
Edited by Armin
Posted (edited)

That goes without saying.

Objects have properties.

I am new in objects. can you please post a one example.Posted Image

Edited by Digisoul

73 108 111 118 101 65 117 116 111 105 116

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...