Drawing & Handwriting Objects. Great for touchscreen devices

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
TLM
Posts: 1608
Joined: 01 Oct 2013, 07:52
Contact:

Re: Drawing & Handwriting Objects. Great for touchscreen dev

Post by TLM » 13 Nov 2013, 12:50

I have to revisit this whole project. Will get back to you v.soon on whether random font colors are supported.

User avatar
Avi
Posts: 193
Joined: 30 Sep 2013, 09:51
Location: India
Contact:

Re: Drawing & Handwriting Objects. Great for touchscreen dev

Post by Avi » 08 Apr 2015, 00:13

Hi @TLM

Is there a way to draw on the InkPicture control from the script side ?
I am in need to mark some coordinates on the InkPicture (or any) control from the script side. I did look in the reference but didn't find anything of interest.

EDIT - Don't bother. I can always create an image with either GDI+ or Gflax and then use the picture control to display it.
Writes at Dev Letters

Clipjump Clipboard Manager : More Scripts (updated 2019)

Image

LAPIII
Posts: 668
Joined: 01 Aug 2021, 06:01

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Post by LAPIII » 01 Jan 2022, 06:47

Can you help me make this resizable:

Code: Select all

#SingleInstance,Force
Gui Add, Text,, Use handwriting recognition below (write letters and wait a bit)
GUI Add, ActiveX, xm w1536 h864 vink, InkEd.InkEdit.1
ink.UseMouseForInput := 1
ink.InkInsertMode := 0
Gui, Show, AutoSize
Return

GuiClose:
ExitApp
[EDIT] In the docs, GUI mentions the subcommand Resize which makes the window resizable and enables its maximize button in the title bar.

Happy New Year!

User avatar
rommmcek
Posts: 1473
Joined: 15 Aug 2014, 15:18

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Post by rommmcek » 01 Jan 2022, 12:29

Try this:

Code: Select all

#SingleInstance,Force
Gui +Resize -DPIScale
Gui Add, Text,, Use handwriting recognition below (write letters and wait a bit)
;GUI Add, ActiveX, xm w1536 h864 vink, InkEd.InkEdit.1
GUI Add, ActiveX, % "hwndhAx xm w" A_ScreenWidth/2 " h" A_ScreenHeight/2 " vink", InkEd.InkEdit.1
ink.UseMouseForInput := 1
ink.InkInsertMode := 0
Gui, Show, AutoSize
Return

GuiSize:
    GuiControl, Move, % hAx, % "w" A_GuiWidth-30 " h" A_GuiHeight-50
Return

GuiEscape:
GuiClose:
ExitApp

LAPIII
Posts: 668
Joined: 01 Aug 2021, 06:01

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Post by LAPIII » 08 Jan 2022, 13:58

Thank you @rommmcek. Can you help me increase the font? In InkEd Control the 2 relevant Members are:

Font Gets or sets the font of the text that the InkEdit control displays

SelFontSize Gets or sets the font size of the selected text within the InkEdit control (run time only).

lblb
Posts: 190
Joined: 30 Sep 2013, 11:31

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Post by lblb » 08 Jan 2022, 18:54

@LAPIII

Some stuff you may find useful:

Code: Select all

ink.Font.Name := "Times New Roman"
ink.Font.Size := 16
ink.Font.Bold := true
ink.Font.Italic := true
ink.Font.Underline := true
ink.RecognitionTimeout := 1000

User avatar
labrint
Posts: 379
Joined: 14 Jun 2017, 05:06
Location: Malta

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Post by labrint » 28 Jan 2022, 06:36

This is great stuff, but how do I save the drawing to a png or jpg?

I need this to insert a signature to a database.

LAPIII
Posts: 668
Joined: 01 Aug 2021, 06:01

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Post by LAPIII » 28 Jan 2022, 10:08

@labrint, alternatively could use Microsoft Whiteboard and export by clicking the hamburger menu to the far right of the screen and then choose Export. Here's what it looks like:

Image

You can adjust the size by cropping when you open it with Windows Photos.

[EDIT]nonetheless I would like a drawing app in AHK.

Post Reply

Return to “Scripts and Functions (v1)”