Sign in to follow this  
Followers 0
alienkillaz

smiley face !

4 posts in this topic

this is my first ever autoit script and all it does is open mspaint and draw a smiley face.

the problem is it only works in 1600x1200 resolution

i tried editing all my x,y coords to be a percent of the current desktop resolution(with much help from Dalarn :idiot: ) so that all my x,y coords are a the same ratio of

(desktop resolution):(where the mspaint toolbrushes and such are)

but it doesnt work in any resolution other then 1600x1200

smily_face.au3

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I took a quick look at ur script heres a few things I noticed

1/The following isnt doing anything !

;AutoItSetOption("MustDeclareVars", 1)
;AutoItSetOption("MouseCoordMode", 0)
;AutoItSetOption("PixelCoordMode", 0)
;AutoItSetOption("RunErrorsFatal", 0)
;AutoItSetOption("TrayIconDebug", 1)
;AutoItSetOption("WinTitleMatchMode", 4)

;This symbol lets you write comments into ur script which help ppl reading ur script when the script runs it ignores everything that follows a ;

So if u do want this in ur script u should write it like this !

Opt("MustDeclareVars", 1)
Opt("MouseCoordMode", 0)
Opt("PixelCoordMode", 0)
Opt("RunErrorsFatal", 0)
Opt("TrayIconDebug", 1)
Opt("WinTitleMatchMode", 4)

2/

Run("mspaint.exe") 
Sleep ( $Sleep )
WinActivate("untitled - paint", "")

Try this instead

Run("mspaint.exe") 
WinWait("untitled - paint", "")

Cool idea for a first script !

Happy scripting :idiot:

Edited by nova

Share this post


Link to post
Share on other sites

Nice effort for the co-ordination of using variables for drawing.

Why you did not use Winmove function to move or resize the window? A reserved size would mean any resolution would not be an issue?

It reads an ini file? what ini?

Nice effort, for your 1st script. :idiot:

Share this post


Link to post
Share on other sites

Nice effort for the co-ordination of using variables for drawing.

Why you did not use Winmove function to move or resize the window? A reserved size would mean any resolution would not be an issue?

It reads an ini file? what ini?

Nice effort, for your 1st script.  :idiot:

<{POST_SNAPBACK}>

using a reserved window size would have been easier but wouldnt have looked as good or taught me as much

the .ini is just to determine 1 sleep delay and is only there becuase i wanted to learn how it worked

the script works perfectly as far as i know.. except for this:

my new post

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