Sign in to follow this  
Followers 0
Ilyena

Problem with Webpage on a Program Script

16 posts in this topic

#1 ·  Posted (edited)

Well im kinda new at Autoit and im finding it hell hard ;)

I make programs and I put a box of my webpage inside the program however when someone opens my program i want the webpage to be autopmaticly clicked inside the program? I want it to be automaticly clicked because on my webpage it says enter like Forums or enter Main site? And i want the main site to be clicked :P So i was thinking autoit could be used as an add in to my program to automaticly click the Main site?

Is this possible and if so how :) ?

Thankyou :">

Edited by Ilyena

Share this post


Link to post
Share on other sites



Well im kinda new at Autoit and im finding it hell hard ;)

I make programs and I put a box of my webpage inside the program however when someone opens my program i want the webpage to be autopmaticly clicked inside the program? I want it to be automaticly clicked because on my webpage it says enter like Forums or enter Main site? And i want the main site to be clicked :P So i was thinking autoit could be used as an add in to my program to automaticly click the Main site?

Is this possible and if so how :P ?

Thankyou :">

That's a pretty weak problem description. How about posting a short demo script that reproduces your issue?

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

That's a pretty weak problem description. How about posting a short demo script that reproduces your issue?

;)

Thats kinda of the problem I dont know where to start :P Is there some script i can use to click a certain area in my page when my program opens? i.e The Main page webpage inside my prog

Edited by Ilyena

Share this post


Link to post
Share on other sites

Thats kinda of the problem I dont know where to start :P Is there some script i can use to click a certain area in my page when my program opens? i.e The Main page webpage inside my prog

Play around with the examples in the help file under the _IE* functions. When you get stuck, you'll have a more specific and informed question to ask.

Good luck with it.

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Play around with the examples in the help file under the _IE* functions. When you get stuck, you'll have a more specific and informed question to ask.

Good luck with it.

:P

Ive come up with a better question!

- I need code to auto click my mouse in the middle of my screen has anyone got the code for that?

Much apreciated.

Edited by Ilyena

Share this post


Link to post
Share on other sites

I kinda have the same thing, i was looking through this forum cause im really stuck and saw this and its the same problem i have.

i want to have something autoclicked lets say in the middle of the screen when a program starts up.

i have been trying it for a long time now and i really dont know how to do it.

can any1 be so kind to help me with this code?

i can do something in return (website stuff)

if you dont want to post any of your code pm me and we can have a talk about it

Thanks

Share this post


Link to post
Share on other sites

Ive come up with a better question!

- I need code to auto click my mouse in the middle of my screen has anyone got the code for that?

Much apreciated.

Look at MouseClick() in the help file, try the example script there.

BTW, notice how often that help file keeps coming up...?

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

I kinda have the same thing, i was looking through this forum cause im really stuck and saw this and its the same problem i have.

i want to have something autoclicked lets say in the middle of the screen when a program starts up.

i have been trying it for a long time now and i really dont know how to do it.

can any1 be so kind to help me with this code?

i can do something in return (website stuff)

if you dont want to post any of your code pm me and we can have a talk about it

Thanks

MouseClick(), or ControlClick() in the help file... again.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

MouseClick(), or ControlClick() in the help file... again.

:P

I got the clicking working but the problem is it doesnt click where i wanna have it clicked on other computers (with higher resolution) and im kinda stuck here.

i have no idea what to do now :S any ideas? or help?

Share this post


Link to post
Share on other sites

I got the clicking working but the problem is it doesnt click where i wanna have it clicked on other computers (with higher resolution) and im kinda stuck here.

i have no idea what to do now :S any ideas? or help?

Look in the help file (There it is AGAIN!!!) for MouseCoordMode and make your coordinates relative to the window. Desktop resolution shouldn't be an issue then.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Look in the help file (There it is AGAIN!!!) for MouseCoordMode and make your coordinates relative to the window. Desktop resolution shouldn't be an issue then.

:P

How does MouseCoordMode work and how can it make the mouse cordinates relivite to windows resolution?

I know your in love with help files; but what is a help file? Where is it?

Sorry if im asking for more help rather than go look there etc.

Edited by Ilyena

Share this post


Link to post
Share on other sites

If you are using SciTe just hit F1

If you are not using SciTe.... start using SciTe


[u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote]

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

How does MouseCoordMode work and how can it make the mouse cordinates relivite to windows resolution?

I know your in love with help files; but what is a help file? Where is it?

Sorry if im asking for more help rather than go look there etc.

If you installed AutoIt, then the help file is in the Start menu under AutoIt. The help file is the full AutoIt command reference and includes some basic tutorials and examples for almost every function. MouseCoordMode is one of the options you can set with the Opt() function. Read about it in the... well, you know. ;)

P.S. And SpookMeister is right, if you are not using SciTE you are just torturing yourself for no reason.

:P

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

If you installed AutoIt, then the help file is in the Start menu under AutoIt. The help file is the full AutoIt command reference and includes some basic tutorials and examples for almost every function. MouseCoordMode is one of the options you can set with the Opt() function. Read about it in the... well, you know. ;)

P.S. And SpookMeister is right, if you are not using SciTE you are just torturing yourself for no reason.

:P

Ok i got the hang of help files and now im feeling more lost >.< I just want it to click on my program in a certain place ( which i got) But on diffrent screen resoultions of course the place i chosen moves.

Ive looked on help and it doesnt explain MouseCoordMode in English but in code which is useless if your trying to learn it. Hence help files arnt helping to much. I just want to know this one little thing on how to get the mouse to click on my program in any resolution... A spam of code would be MUCH apreciated of a good explination.

Share this post


Link to post
Share on other sites

I agree i thought this was called the help forum not the hint forum?

wheres the help :S this would help us both alot its all we want to know

HELP US ALREADY >.<

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Ok i got the hang of help files and now im feeling more lost >.< I just want it to click on my program in a certain place ( which i got) But on diffrent screen resoultions of course the place i chosen moves.

Ive looked on help and it doesnt explain MouseCoordMode in English but in code which is useless if your trying to learn it. Hence help files arnt helping to much. I just want to know this one little thing on how to get the mouse to click on my program in any resolution... A spam of code would be MUCH apreciated of a good explination.

From the pesky help file:

MouseCoordMode

Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:

0 = relative coords to the active window

1 = absolute screen coordinates (default)

2 = relative coords to the client area of the active window

The default (if you don't change it) is 1 - screen coordinates. That means "1,1" is the top left corner of the desktop and "1024,768" or "1280,1024" is the bottom right corner.

If you move a window on a desktop, the position of buttons and things in the window move relative to the desktop. But if a button is 200 pixels from the left of window and 300 pixels from the top of the window, that position doesn't change relative to the window. So to specify your mouse coordinates as relative to the active window, use MouseCoordMode 0. That means "1,1" is the top left corner of the app window.

The "client area" of a window does not include the title bar, boarder, or menu bar. So a MouseCoordMode of 2 allows you to use coordinates that are relative to the window within the client area. That means "1,1" is on the left side of the app window, right under the menu bar.

Options are set in AutoIt with the Opt() function. So setting MouseCoordMode to 0 would look like: Opt("MouseCoordMode", 0)

This demo shows what happens when you change MouseCoordMode. Every 2sec it moves the mouse to the same coordinates (1,1). But that winds up being a different place based on what the current MouseCoordMode option is:

HotKeySet("{ESC}", "_Quit")
$PID = Run("notepad.exe")
WinWait("Untitled - Notepad")
$hWin = WinGetHandle("Untitled - Notepad")
WinMove($hWin, "", 200, 200, 600, 480)
WinActivate($hWin)
WinWaitActive($hWin)
ControlSend($hWin, "", "[CLASSNN:Edit1]", "Demonstrating the three MouseCoordMode values." & _
        @CRLF & "Hit ESC to exit the script.")

While 1
    For $n = 0 To 2
        Opt("MouseCoordMode", $n)
        MouseMove(1, 1)
        ToolTip("Mode = " & $n)
        Sleep(2000)
    Next
WEnd

Func _Quit()
    ProcessClose($PID, 1)
    Exit
EndFunc   ;==>_Quit

Use the AutoIt Window Info tool (Au3Info.exe) to find out the coordinates of your button, or whatever. There is an option in Au3Info to show you mouse coordinates relative to the desktop or app window. Set the MouseCoordMode option to 0, and the button should be in the same place regardless of the desktop size or if the app window gets moved.

:P

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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