Jump to content

Using ControlClick to click a program's taskbar options? Yes or no?


Recommended Posts

Maybe we can start with the help docs and the syntax:

ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] )

[, button = "left" [, clicks = 1 [, x [, y]]]] ) ...what does this syntax mean? I spent 30minutes trying to figureout how to read and write this syntax and trying to find example, and I finally found one at the end of the universe and have no idea how I was supposed to figure this out without the example (there was literally a forum post asking how to use and someone just copy pasted the first three argument example from the help file as the answer). Is there some language the docs are written in I can lookup how to read?  What is going on with the square brackets there? If it was all meant to signal optional parameters why r they all overlapping dependently on eachother like that...just do 1 square bracket?

So say I want to click...the "view" button on a basic notepad. Can I use controlclick for this or not? The docs indicate every part of a window is divided into sections that can be referenced this way.

ControlClick("Untitled - Notepad", "", 15,"left", 1, 248, 57)

The x,y tho seem to be relative to the window in question....so u rely on the "ControlClick Coords"...okay, great. But these are only good for the id of edit1 aka 15...which is just below what you want to click. They don't seem to exist outside that window at least they aren't showing up in the viewer provided. And contrary to what the doc says that's the only window with controlclick coords, so how do I send click to the taskbar of notepad options? file/edit/view? Or is that not possible? There are at least 3 threads asking this same question, none of them provided answers to the question. Here's my favourite one where they completely ignore what was actually asked, seems to be theme on the internet:

 

I also find forums referencing IRC chat and all these help resources.....but where? Where!?? Seriously, where are these? Where does it say these exist? I have looked all over the 'official unfinished official information' slants and the unofficial across google trying to find. I don't know if you guys can google from the darkness of noobtown, but nothing shows up other than forum posts talking about how all these resources exist and there are too many of them.....very remarkable stuff. I would personally recommend the giant tab "autoit resources' include the list of such places...I don't really get why that tab exists it's just a repeat of the downloads section.

Link to comment
Share on other sites

1 hour ago, kirb said:

I spent 30minutes

Lol, I spent over 40 years understanding what computer science is about.  Stop making wall of words and make a runable script that all we actually can run...

Link to comment
Share on other sites

On 3/24/2024 at 5:55 PM, Nine said:

Lol, I spent over 40 years understanding what computer science is about.  Stop making wall of words and make a runable script that all we actually can run...

And yet you spend your free time trolling the help forums of ancient technology. If you have 40 years of anything, why don't you prove it and answer the question? You can't even write English. Maybe start there. Otherwise I have no use for you, this after-all a place where you put your platitudes aside and work towards answering 'other' peoples questions. Or is the forum dead and I am wasting my time? Perhaps your pitiful career can answer at least one question for me. Regardless I look forward to listing your various accomplishments, knowing you feel the need to hijack every discussion to prove yourself to every stranger you come across on the internet.

Link to comment
Share on other sites

  • Moderators
Posted (edited)

kirb,

Quote

[, button = "left" [, clicks = 1 [, x [, y]]]] ) ...what does this syntax mean?

What is going on with the square brackets there? If it was all meant to signal optional parameters why r they all overlapping dependently on eachother like that...just do 1 square bracket?

That type of syntax has been in use for at least the past 35 years to indicate optional parameters and default values - even my old DOS programs written in Assembler used it!

And there are separate brackets because in AutoIt you must supply a value for optional parameters (even if that is the default value) when you are going to use non-default parameters later in the call.

All this is clearly explained in the Help file:

https://www.autoitscript.com/autoit3/docs/function_notes.htm

Now, regarding your ad hominen attack on one of our forum's MVPs, I find it well out of line for a complete newbie to post such a diatribe. Please adjust your attitude or your stay here will not be long. Consider this a formal warning.

M23 

 

Edited by Melba23
Added link

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

 

Link to comment
Share on other sites

In my experience on this forum, both in the "old days" and now, I've found the people warm and welcoming and very helpful. As a guy who was generally the smartest guy in the room at almost every job I've held, I'm humbled by how much smarter the regulars are here. If @Nine @argumentum @Melba23 and some of the others comment on your thread, they are top talent, not just rando forum trolls on power trips. With that in mind, you do get what you put in: if you're willing to put in the effort, you'll get effort in return. If you're bitter/angry/combative/a dick because of your frustration, you'll get shut down. Frustration happens when you're banging you head against a thing that appears to make no sense, but please strip that out when you post your code :) 

That aside, AutoIt syntax is similar to VB (and because of that I've been able to learn a tiny bit of VB along the way but that's beside the point). The brackets are nested and denote optional arguments: for every "[" you have to have a matching, ending "]" to close it. Each argument is bracketed because they are independent. A single set of brackets would mean they all need to be included. The samples in the help really are a lifesaver. Run them, make changes, re-run them; learn and see how it works. When I started getting ahold on the fundamentals it was an exciting light bulb moment for me. I hope you'll have the same.

As I said above, these are a great bunch of smart people and are very willing to help if you're showing the effort and leaving the most negative feelings on your side of the keyboard.

Edited by rsn
grammar/spelling 🤦‍♂️
Link to comment
Share on other sites

5 hours ago, Melba23 said:

Now, regarding your ad hominen attack on one of our forum's MVPs, I find it well out of line for a complete newbie to post such a diatribe. Please adjust your attitude or your stay here will not be long. Consider this a formal warning.

First of all, it is of course your decision as a moderator to issue a formal warning and a time ban. However, I personally highly doubt that any of these measures will change the behavior of this arrogant jackass. 

I would even consider the aggressive attacks to be an argumentum ad personam, not just an argumentum ad hominem (which would be bad enough already).

Spoiler

In his work on eristic dialectics, the philosopher Arthur Schopenhauer describes an argumentum ad personam as a sham argument which, like the argumentum ad hominem, is directed at the person of the opponent but no longer contains any reference to the actual subject of the dispute and only attacks factually irrelevant personal characteristics. In contrast to the argumentum ad hominem, it does not require a logical structure and, in extreme cases, consists of a simple insult.

With his insults against @Nine , @kirb has crossed every line that I consider acceptable (newbie or not). Some people don't deserve a second chance and should be removed from the system immediately.  

(just my 2 cents)

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
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
 Share

  • Recently Browsing   0 members

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