Jump to content
isBrainDed

Note drawing script

Recommended Posts

Update 27/02/2019
I have updated the script to work with all screen resolutions ( tested with 1080p and 1440p, should work with all other resolutions ) and I have added Image.exe to the zip file, which allows you to run the script without installing autohotkey ( USE THIS AT YOUR OWN RISK ), the .exe is not malicious but if you do not trust me, you can always use the code included below or the Image.ahk.

 

When the Notes were originally released, I made a script that allows you to copy pictures from your PC onto the note, I played it with little bit and released some pictures in the #fashion but forgot about it afterwards, so I have now decided to release them to the public, for everyone to use.

Below is the download link with the script and the required files, extract the files into a folder and follow the Tutorial.txt

You can right click on the Image.ahk to preview the code and be sure its not malicious, I will also be putting the code in the bottom so you can compile and make it by yourself

File: https://cdn.discordapp.com/attachments/400801629000957953/550318704458596527/ImageScript.zip

Instructions:

 

Installation and running script:

1. Go to https://autohotkey.com/download/ and click on the "Download AutoHotkey Installer
2. Install the software wherever you want, ( Selecting Unicode 64 is suggested ) anything else should be default.
3. Prepare the picture that you want, name it "image.bmp" ( I will explain this later ), then right click on the Image.ahk and run as admin
4. You have at least 5 seconds to alt tab to the game and press I and open a note, after that you just leave the mouse alone.
5. When its done drawing the image, at the end you will receieve a pop up with a number, that number means how many seconds it took to draw it,
   the max I got was 340 seconds. More complex the image, more time it takes.

###### If the script is running to long or you have any other issue you can close the script by pressing ESCAPE  #####

Preparing a picture:
1. Get a black and white picture of something.
2. Max WIDTH of the picture is 395 pixels, max HEIGHT is 546 pixels. ( Clicking on resize button in paint and then pixels shows the dimensions,
   I suggest keeping mantain pixel ratio on. )
3. Once either WIDTH or HEIGHT is at the correct size, you can use white squares at the bottom or right side of the picture, to increase
   HEIGHT or WIDTH respectevely to their max lenghts. I suggest that you always make the canvas the max size due to compatibility.
4. Go to file, click on save as, pick the name, if you dont want to edit the script, I suggest you name it "image.bmp". Click on type
   and select "Monochrome bitmap"
5. That should be it then, you might lose some pixels due to them not being perfectly black when doing so.

###### If the script is running to long or you have any other issue you can close the script by pressing ESCAPE  #####

Important stuff: 
1. You need to have Gdip.ahk Image.ahk and image.bmp in the same folder, anywhere on the computer. 
2. You have to run as admin due to Rage MP running as admin.
3. You have to run the game in fullscreen borderless ( just fullscreen might work too? Not tested )
4. You cant move the mouse or do anything while the script is running, which is why I implemented ESCAPE button
5. If ESCAPE doesn't work, last resort is CTRL + ALT + DEL and sign out of the user or shutdown PC.

 

 

You need to include this file in the same folder as the script below

https://github.com/tariqporter/Gdip/blob/master/Gdip.ahk

Code: 

 

#SingleInstance, Force
SetBatchLines, -1
SetWorkingDir %A_ScriptDir%

#Include Gdip.ahk

Sleep, 5000
StartTime := A_TickCount
pToken := Gdip_Startup()
pBitmap := Gdip_CreateBitmapFromFile("image.bmp")
FoundBlack := {}
y := 545

Screen_X := Floor((A_ScreenWidth / 2)) - 170
Screen_Y := Floor((A_ScreenHeight / 2)) - 277

Loop, 546{
	x := 394
	Loop,395{
		Val := Gdip_GetPixel(pBitmap,x,y) + 0
		if( Val = 4278190080 ){
			;MsgBox, % "Val " Val " " x " "y
			;MouseClickDrag, Left, x + 791, y + 264, x + 792, y + 264, 0 263
			thing := {}
			thing.x := x
			thing.y := y
			FoundBlack.Push(thing)
		}
	x--
	}
	y--
}
Gdip_DisposeImage(pBitmap)
Gdip_Shutdown(pToken)
Loop{
	if(FoundBlack.Length() = 0){
		break
	}
	temp := FoundBlack.Pop()
	distance :=1
	Loop{
		if(FoundBlack[FoundBlack.Length()].x != ( temp.x + distance) OR FoundBlack[FoundBlack.Length()].y != temp.y){
			break
		}
		distance++
		FoundBlack.Pop()
	}
	MouseClickDrag, Left, temp.x + Screen_X, temp.y + Screen_Y, temp.x + Screen_X + distance, temp.y + Screen_Y, 0
}
ElapsedTime := ( A_TickCount - StartTime ) / 1000
MsgBox, %ElapsedTime% END
; 215 WIDTH
; 234 HEIGHT
; 791,264 | 1186,810 == WIDTH 395 | HEIGHT 546

Escape::
ExitApp
Return

 

Edited by BrainDed
  • Like 14
  • PogU 2
  • Upvote 1
Link to comment
Share on other sites

Update 27/02/2019:

Updated the script to work with all screen resolutions and added Image.exe to the zip file, which allows you to run the script without installing Autohotkey ( USE EXE AT YOUR OWN RISK ), the .exe is not malicious but if you do not trust me, you can always use the code included in the original post or the Image.ahk.

  • Like 1
  • PogU 1
Link to comment
Share on other sites

This might be the coolest thing in all of eclipse!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Amazing script. Thank you so much for this!!!!!

I was trying to make a little something special for my grand opening, and wanted to try and make flyers. 

A friend linked this thread, and WOW! I'm amazed. Really great, and made my day!

dAiorFA.jpg

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and our Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.