![]() |
|
|
#1 | |
![]() Join Date: Apr 2007
Location: US
Posts: 2,521 (1.11/day)
Thanks: 240
Thanked 190 Times in 157 Posts
|
My CopyMe program for Facebook Graffiti app
Hey,
If you are not familiar with Graffiti app on Facebook - it is a small app that allows you to draw pictures for your friends on Facebook. Pictures are posted to their wall and they can then view how you drew them, step by step. I know it might sound silly, but I liked it. Me and one of my friends liked using it to draw all kinds of things, whenever one of us had birthday, or any other occasion. It sure was fun using it. It felt like it was better than a present you buy at the store because you put your time into it and you just know that the other person will appreciate it. (I know it silly, but keep reading. )So, I did a lot of drawings and each one was taking more time than before. They were also more complicated and more beautiful, but I was spending up to 4 hours on one drawing. I though, I would try something new and write a program that would draw pictures for me. Here is how it works:
So, what do you think? PM me if you want to receive a copy of the program and try it out. ![]() Code:
Gui, Add, GroupBox, x12 y10 w170 h50 , Current Mouse Pos
Gui, Add, Text, x22 y30 w50 h20 , vMouseX
Gui, Add, Text, x72 y30 w50 h20 , vMouseY
Gui, Add, Text, x122 y30 w50 h20 , vMouseColor
Gui, Add, GroupBox, x12 y70 w170 h70 , Input Mouse Coord
Gui, Add, GroupBox, x12 y170 w180 h90 , Load Mouse Pos
Gui, Add, Text, x22 y90 w50 h20 , From
Gui, Add, Text, x22 y110 w50 h20 , To
Gui, Add, Edit, x72 y90 w60 h20 , vInputBegX
Gui, Add, Edit, x132 y90 w50 h20 , vInputBegY
Gui, Add, Edit, x72 y110 w60 h20 , vInputEndX
Gui, Add, Edit, x132 y110 w50 h20 , vInputEndY
Gui, Add, Text, x22 y190 w50 h20 , From
Gui, Add, Text, x22 y210 w50 h20 , To
Gui, Add, Edit, x72 y190 w60 h20 , vInputBegX
Gui, Add, Edit, x132 y190 w50 h20 , vInputBegY
Gui, Add, Edit, x72 y210 w60 h20 , vInputEndX
Gui, Add, Edit, x132 y210 w50 h20 , vInputEndY
Gui, Add, Button, x22 y140 w50 h20 , Start
Gui, Add, Button, x82 y140 w50 h20 , Copy
Gui, Show, x524 y513 h267 w206, CopyMe
Return
StartScan:
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
MouseGetPos, xpos, ypos
GuiControl,, Static1, %xpos%
GuiControl,, Static2, %ypos%
PixelGetColor, color, xpos-1 , ypos-1
GuiControl,, Static3, %color%
;Gui, Color, %color%
return
ButtonStart:
SetTimer, StartScan, 550
return
#z::
GuiControl,, Edit1, %xpos%
GuiControl,, Edit2, %ypos%
return
#x::
GuiControl,, Edit3, %xpos%
GuiControl,, Edit4, %ypos%
return
#c::
GuiControl,, Edit5, %xpos%
GuiControl,, Edit6, %ypos%
return
#v::
GuiControl,, Edit7, %xpos%
GuiControl,, Edit8, %ypos%
return
ButtonCopy:
SetTimer, StartScan, Off
ControlGetText, inpx, Edit1
ControlGetText, inpy, Edit2
ControlGetText, inpxx, Edit3
ControlGetText, inpyy, Edit4
ControlGetText, loadx, Edit5
ControlGetText, loady, Edit6
ControlGetText, loadxx, Edit7
ControlGetText, loadyy, Edit8
count1 := inpxx-inpx
count2 := inpyy-inpy
y = 1
Loop, %count2%
{
x = 1
Loop, %count1%
{
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
PixelGetColor, color, inpx + x , inpy + y
GuiControl,, Static3, %color%
if (color = color2)
{
MouseClick, left, loadx + x, loady + y,,0
}
x:= x+1
}
y:= y+1
}
return
#f::
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
PixelGetColor, color2, xpos-1 , ypos-1
return
GuiClose:
ExitApp
Quote:
__________________
Last edited by a111087; Oct 23, 2011 at 05:15 PM. |
|
|
|
|
|
|
#2 |
![]() Join Date: Mar 2010
Location: Jakarta, Indonesia
Posts: 3,717 (3.15/day)
Thanks: 193
Thanked 853 Times in 559 Posts
|
looks nice
__________________
:: New Cases, Tips And All About Your Cases Visit CaseGear :: ![]() Don't Ever Ask About Love And Honesty That You Don't Ever Have |
|
|
|
| The Following User Says Thank You to micropage7 For This Useful Post: |
|
|
#3 |
|
Eligible for custom title
Join Date: Dec 2007
Location: KU
Posts: 6,935 (3.47/day)
Thanks: 1,603
Thanked 2,064 Times in 1,610 Posts
|
Your computer might take 2-3 hours to finish, and you might not be able to use it during that time.
Try me... This could be a new benchmark
__________________
|
|
|
|
|
|
#4 |
|
"I go fast!1!11!1!"
Join Date: Oct 2008
Location: IA, USA
Posts: 10,654 (6.23/day)
Thanks: 1,788
Thanked 2,633 Times in 1,987 Posts
|
I think you should not use the mouse and you could really cut down on the time if it were multithreaded. XD
What language is it coded in? If you're using .NET, create a Bitmap and use the various tools to "paint" on it. You can easily target a single cell in the image and change the color. Except for the "add color" part, I don't see what your program does. It looks like it changed black to gray.
__________________
Golden Rule of Programming: Never assume. try { SteamDownload(); } catch (Steamception ex) { RageQuit(); } |
|
|
|
|
|
#5 | ||
![]() Join Date: Apr 2007
Location: US
Posts: 2,521 (1.11/day)
Thanks: 240
Thanked 190 Times in 157 Posts
|
Quote:
Quote:
Heart of the program is a really small nested loop and while there are no explicit delays written into the code, autohotkey decides that you could use some delay in your program. ![]() The reason why draft looks grey, instead of pure black is because Graffiti app can't draw single pure black pixel from just one click of a mouse (which is what my program does, it reads placement of black or white pixels, then clicks in an app to draw that image, pixel by pixel)
__________________
|
||
|
|
|
| The Following 2 Users Say Thank You to a111087 For This Useful Post: |
|
|
#6 |
![]() Join Date: Jun 2010
Location: Wild Wild East
Posts: 4,859 (4.41/day)
Thanks: 2,447
Thanked 1,421 Times in 978 Posts
|
can i haz it?
__________________
|
|
|
|
|
|
#7 | |||
|
"I go fast!1!11!1!"
Join Date: Oct 2008
Location: IA, USA
Posts: 10,654 (6.23/day)
Thanks: 1,788
Thanked 2,633 Times in 1,987 Posts
|
Quote:
![]() Quote:
![]() Quote:
__________________
Golden Rule of Programming: Never assume. try { SteamDownload(); } catch (Steamception ex) { RageQuit(); } |
|||
|
|
|
|
|
#8 | |
![]() Join Date: Apr 2007
Location: US
Posts: 2,521 (1.11/day)
Thanks: 240
Thanked 190 Times in 157 Posts
|
Quote:
![]() There is of course a way to upload an image straight to a wall, but not to a graffiti app.
__________________
|
|
|
|
|
| The Following User Says Thank You to a111087 For This Useful Post: |
|
|
#9 |
![]() Join Date: Apr 2007
Location: US
Posts: 2,521 (1.11/day)
Thanks: 240
Thanked 190 Times in 157 Posts
|
just added full code to the first post
and here is a link for download (click free at the bottom): http://www.megashare.com/3666639
__________________
|
|
|
|
|
|
#10 | |
![]() Join Date: Apr 2007
Location: US
Posts: 2,521 (1.11/day)
Thanks: 240
Thanked 190 Times in 157 Posts
|
Quote:
__________________
|
|
|
|
|
|
|
#11 |
|
"I go fast!1!11!1!"
Join Date: Oct 2008
Location: IA, USA
Posts: 10,654 (6.23/day)
Thanks: 1,788
Thanked 2,633 Times in 1,987 Posts
|
Good question and I think the answer would be very complex (memory hacking). Is it not the point of a Graffitti app to paint, not copy?
Bypassing autohotkey would provide a rather large performance boost though because you could adjust the delay yourself (if it is even necessary).
__________________
Golden Rule of Programming: Never assume. try { SteamDownload(); } catch (Steamception ex) { RageQuit(); } |
|
|
|
|
|
#12 | |
![]() Join Date: Apr 2007
Location: US
Posts: 2,521 (1.11/day)
Thanks: 240
Thanked 190 Times in 157 Posts
|
Quote:
So, it is cheating, but just a little bit.
__________________
|
|
|
|
|
|
|
#13 |
![]() Join Date: Apr 2007
Location: US
Posts: 2,521 (1.11/day)
Thanks: 240
Thanked 190 Times in 157 Posts
|
lol, I just corrected a mistake in the instructions.
You need to use Windows key, not Control key.
__________________
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Facebook App Developer any one? | smartali89 | Programming & Webmastering | 0 | May 23, 2011 08:36 AM |
| Graffiti Style Wallpaper - illustrating various hardware logos | 20mmrain | General Hardware | 153 | Oct 23, 2010 02:35 PM |
| Looking for an Multi Core LCD app for my G15?? | Live OR Die | General Software | 5 | Jul 5, 2010 09:18 PM |
| looking for a program to turn volume levels up and down per program | acousticlemur | General Software | 0 | Oct 3, 2008 06:50 PM |
| Facebook Founder Sued For Concept Theft | HellasVagabond | News | 2 | Jul 24, 2007 02:58 AM |