Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

AHK Art


  • Please log in to reply
17 replies to this topic
  • Guests
  • Last active:
  • Joined: --
As I was messing around with Mousemove, I came up with one idea;
:!: What if you made the mouse click and drag a pensil in a graphics application like Paint Shop Pro or Photoshop? So I used this script to make the mouse move in a circle. Not very sofisticated, ey?
BUT, when I tried to move the mouse, when it still was circling around, it drew something mush prettier than just a circle... :O

Try it out!
#Persistent 
#Singleinstance force
hotkey, Esc, Ex
coordmode, tooltip, Screen 
sleep 5000
msgbox, Start! ´nPress Esc to terminate script
loop 
{ 
B_Index := A_Index 
r := 200
mouseclick,,,,,,D
loop, 640
{ 
gosub WatchTool 
sleep 15 
} 
mouseclick,,,,,,U
} 
return 

WatchTool: 
B_Index := B_Index * 1.01 
Y := (sin(A_Index) * r) + 400
X := (cos(A_Index) * r) + 400
ToolTip, %Y%, %X%, %Y%
Mousemove, %X%, %Y%
return 

Ex:
mouseclick,,,,,,U
exitapp


cos(x) 
{ 
transform, cos, cos, % x / 100 
return cos 
}

sin(x)
{
transform, sin, sin, % x / 100
return sin
}

Int(Value)
{
Transform, Integer, Floor, Value
return Integer
}
All you have to do is:
1. Open Paint Shop, Photoshop or whatever you have
2. Click on the pensil tool (choose color, pattern etc. to make it even prettier)
3. Run the script above
4. Maximize your Paint Shop Pro(or whatever you have) window
and let the script start.
5. Then, you try to move the mouse over the screen. But in the almost same moment you do that, the script will automatically move it back to its original path (the circle) and you have created you very first AHK Art!
It sounds very primitive, but it looks better that it sounds!

Please post you results or comments!

-¤GoO¤-
  • Members
  • 60 posts
  • Last active: Apr 28 2007 10:17 PM
  • Joined: 22 Feb 2005
Oops.
:oops: Forgot to log on *need sleep*
"Make everything as simple as possible, but not simpler."
- Albert Einstein (1879-1955)

ULTRA
  • Members
  • 19 posts
  • Last active: Mar 11 2012 09:39 PM
  • Joined: 15 Feb 2005
:lol:

I'm a real AHK artist :D

Posted Image
In a world without walls and fences who needs windows and gates?

BoBo
  • Guests
  • Last active:
  • Joined: --
@ ULTRA
Hey van Gogh, sorry - van Ultra, we need you [here] :wink:

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
wowee thats flash.

Posted Image

Serenity
  • Members
  • 1271 posts
  • Last active:
  • Joined: 07 Nov 2004
Cool script :)

I made a wallpaper, its a bit dark :twisted: (click image for fullsize version)

Posted Image
"Anything worth doing is worth doing slowly." - Mae West
Posted Image

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
These are all amazing!

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
Cool script & great looking images :).


Time for sleep... :oops: :lol:
Posted Image

olaf
  • Members
  • 25 posts
  • Last active: Nov 08 2005 08:09 PM
  • Joined: 20 Apr 2005
cool script, even though i don't understand the math yet. how do you post pics?
Berserker

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012

cool script, even though i don't understand the math yet. how do you post pics?

It's simple really, just upload your picture - a good free image upload site is ImageShack and use the IMG tags when posting.

See More.
Posted Image

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


Unknown Person
  • Guests
  • Last active:
  • Joined: --
Error at line 34.

Line Text: cos(x)
Error: This line does not contain a recognized action.

The program will exit????????

What can i do?

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
Download and install a newer version of AutoHotkey :)

Unknown Person
  • Guests
  • Last active:
  • Joined: --
Thx Corrupt, it works fine now... ;)

wulfgar
  • Members
  • 41 posts
  • Last active: Mar 02 2007 11:34 PM
  • Joined: 05 Jul 2006
Great script ,but how i can do that it start make circle in current mouseposition (not 400,400) ?
□ <- omg box ?

jps
  • Members
  • 279 posts
  • Last active: Sep 11 2011 07:26 PM
  • Joined: 02 Sep 2006
Sorry to bump such an old thread but could someone please tell me how to make it draw the circle anti-clockwise.Currently it draws one clockwise.I dont understand the math.Thanks

And wulfgar,to use the current mouse position just put
mousegetpos, CurrentX, CurrentY
before the first loop and change the 400's for CurrentY and CurrentX