Sign in to follow this  
Followers 0
grindy

Help file leaves a lot to be desired, so I'm asking you people..

7 posts in this topic

#1 ·  Posted (edited)

I'm NOT a great programmer by any stretch of the imagination, I'm not even a good one - but I do try... A friend recommended AutoIt to me as a way to create a small .exe that I can call from another program, but I can't seem to get (what I think should be really trivial) it to work, and I think a good part of it is the way the help file for AutoIt is written.

Let me give you a simple example:

The description for the Send command shows:

Send ( "keys" [, flag] )

**Notice the spaces between the parenthesis and brackets and the value itself.**

However, throughout the Help file, I see examples such as:

Send("{DEL 4}")

**Again, notice the lack of spaces between the parenthesis and brackets and the value itself.**

I've done enough programming to think that these spaces DO matter, and need to know from you:

A - Do they matter?

B - If they do, then which Help file example is correct?

Oh, and if any of you would care to help me, here's what I want to do with AutoIt:

I want to compile a small .exe that will do the following:

I want the window of the program that will be the recipient of the F4 that I'm going to be sending to it, to have the focus (if it doesn't have it already), and I want to keep it active for the F4 key I'm sending to it. That's it! But so far, I'm failing miserably....

I know (well I think I know) that to do this I'll be using: WinActivate, SendKeepActive, and Send in order to achieve this. If there's anything else any of you think I might need to achieve what I mentioned, feel free to comment... And, if any of you wants to write (and share here) this little snippet of a code, by all means help yourself...

Thx for listening, and thx in advance for any help you can offer...

:bye:

Edited by grindy

Share this post


Link to post
Share on other sites



B - They do, sometimes, and both examples are correct. The first quoted example shows the correct syntax for the function, and the second shows the actual usage of that function. In this case, the space DOES matter, as DEL4 is different than DEL 4. If there were more than one flag, or parameter, passed to a function, a space before or after the comma separating the parameters is not needed, but could be used for aesthetic purposes (ie, the code would be sometimes easier to read).


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Only the spaces within a string matter.

Send("{Del 4}",1)
and
Send ( "{Del 4}" , 1 )
are equivalent.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

So you want to make a window and have it recieve a key (F4) you press? Because using Send would be to actually send the key FROM the program...

Share this post


Link to post
Share on other sites

What do you mean by "receive a key"?

The window should act on a key pressed by the user?

When the window is active (has focus) the user input is received by the window. You would like to act on the specific user input even when the window is inactive?

Can you please elaborate on what you want to do?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I agree with JohnOne, you're not providing a lot of information for us to try to assist. What is the name of the application you're trying to manipulate, and what does the window look like? There may be a much easier way to accomplish what you're trying to do.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0