Sign in to follow this  
Followers 0
staufi90

Windows Server 2012 and AutoIT Script!

7 posts in this topic

#1 ·  Posted (edited)

Hey guys, i need your help!

I use some simple AutoIt Scripts so click on different positions on some homepages.
That's a example.

MouseClick("left", 2049, 12, 1, 1)
sleep(100)
MouseClick("left", 2049, 12, 1, 1)
sleep(500)
MouseClick("left", 2320, 291, 1, 1)
sleep(500)
MouseClick("left", 2506, 400, 1, 1)

 

It works. So now my problem. I want to use this scripts on a Windows Server 2012. The scripts only works when i have a active RemoteDesktopConnection.

So i search on google and found some info that it could work with ControlClick. :ermm:

My Idea from the help box but it didn't work... :ermm:

ControlClick("Binary Options Trading | MarketsWorld - Google Chrome", "", "[CLASS:Chrome_RenderWidgetHostHWND; INSTANCE:1]", "left", 1, 394, 293)

 

This is the summery from the AutoIT Window Info:

>>>> Window <<<<
Title:    Binary Options Trading | MarketsWorld - Google Chrome
Class:    Chrome_WidgetWin_1
Position:    1912, -8
Size:    1616, 916
Style:    0x17CF0000
ExStyle:    0x00000100
Handle:    0x00000000000B071C

>>>> Control <<<<
Class:    Chrome_RenderWidgetHostHWND
Instance:    1
ClassnameNN:    Chrome_RenderWidgetHostHWND1
Name:    
Advanced (Class):    [CLASS:Chrome_RenderWidgetHostHWND; INSTANCE:1]
ID:    211753024
Text:    Chrome Legacy Window
Position:    0, 69
Size:    1600, 839
ControlClick Coords:    394, 232
Style:    0x56300000
ExStyle:    0x00000020
Handle:    0x00000000000F0078

>>>> Mouse <<<<
Position:    2314, 293
Cursor ID:    0
Color:    0x0C54CC

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
Chrome Legacy Window


>>>> Hidden Text <<<<

 

Can somebody could help me and to translate my normal MouseClick into a ControlClick?

Thanks for your support :)

Edited by staufi90

Share this post


Link to post
Share on other sites



I just have to ask...why would you be browsing a Trading site (or any site, for that matter) on a server??


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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I use this AutoIT scripts to trade automatically on Trading Sites. I develop some indicators for MT4. So the script do my work ;)

Edited by staufi90

Share this post


Link to post
Share on other sites

I think the point he was trying to make is, why are you doing something so dumb as to surf the web on some trading sites, on a server?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Oh easy reply. The script placed trades for me on this sites.

I use a server because i don't want that my pc runs 24hours a day. :)

Edited by staufi90

Share this post


Link to post
Share on other sites

So could anybody help me with this problem? I'm not a good programmer :ermm:

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Oh easy reply. The script placed trades for me on this sites.

I use a server because i don't want that my pc runs 24hours a day. :)

The cost of running a PC 24/7 is much less than a server.  I think a valid concern that JLogon and BewMan may share with myself (as would most any server admin) is that web activity on a server is a bad idea.  Exposing a server to the web unnecessarily--without proper protections--increases the risk of being compromised.  It's kind of like smoking...you could smoke every day and never get cancer, but the chances of it happening increase with direct relation to usage (dumb analogy I know).  Not that it's any of my business, but if the server performs (an)other essential system function(s) that clients rely on why risk it being compromised; and if the server does nothing else but is used to automate trading, that would be even more so a reason to use a PC.

Just some food for thought.

 

To actually address your question ControlClick can be tricky--if even possible--when used with non-standard controls. Certain controls respond to mouse click messages and I believe this is what the controlclick function is designed to do. One of these links may lead you down the right path, but by first-glance it may nott be as simple as telling the script to "click here".

Edited by spudw2k

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