Hello!
I want to draw a line with an GUI command
Is it possible to:
- do it "directly"? (or maybe I must have lines as image)
- deciding on appearance / thickness?
- selecting color?
Jan
Draw Line GUI
Started by
Albireo
, Feb 27 2010 06:15 PM
8 replies to this topic
#1
-
Posted 27 February 2010 - 06:15 PM
Here's a quick example:
Gui, -Caption +ToolWindow Gui, Color, Red Gui, Show, NA h2 w100
#2
-
Posted 27 February 2010 - 06:28 PM
Here's a way to draw lines:
The "0x10" & "0x11" are specifically lines and the "0x7" is actually a box enclosed and you would use the width/height as "1" to make it look like a line.
I haven't seen any other ways, aside from using pix of your own.
DBM
gui, add, text, x10 y10 w100 0x10 ;Horizontal Line > Etched Gray gui, add, text, x10 y15 h70 0x11 ;Vertical Line > Etched Gray gui, add, text, x10 y+10 w75 h1 0x7 ;Horizontal Line > Black gui, add, text, x10 y+10 w1 h75 0x7 ;Vertical Line > Black Gui, show, center w225 h175
The "0x10" & "0x11" are specifically lines and the "0x7" is actually a box enclosed and you would use the width/height as "1" to make it look like a line.
I haven't seen any other ways, aside from using pix of your own.
DBM
#3
-
Posted 27 February 2010 - 06:35 PM
GDI+ standard library 1.30 by tic
<!-- m -->http://www.autohotke... ... highlight=<!-- m -->
Example 1: Gdip.Tutorial.1-Draw.Shapes.ahk - Create a simple gui and draw an ellipse and a rectangle
<!-- m -->http://www.autohotke... ... highlight=<!-- m -->
Example 1: Gdip.Tutorial.1-Draw.Shapes.ahk - Create a simple gui and draw an ellipse and a rectangle
#4
-
Posted 27 February 2010 - 09:20 PM
Here's a quick example:
Gui, -Caption +ToolWindow Gui, Color, Red Gui, Show, NA h2 w100
Nice red line
Here's a way to draw lines:
gui, add, text, x10 y10 w100 0x10 ;Horizontal Line > Etched Gray gui, add, text, x10 y15 h70 0x11 ;Vertical Line > Etched Gray gui, add, text, x10 y+10 w75 h1 0x7 ;Horizontal Line > Black gui, add, text, x10 y+10 w1 h75 0x7 ;Vertical Line > Black Gui, show, center w225 h175
The "0x10" & "0x11" are specifically lines and the "0x7" is actually a box enclosed and you would use the width/height as "1" to make it look like a line.
I haven't seen any other ways, aside from using pix of your own.
DBM
Thank you - it works för me
(How do you control the color of the line?)
GDI+ standard library 1.30 by tic
<!-- m -->http://www.autohotke... ... highlight=<!-- m -->
Example 1: Gdip.Tutorial.1-Draw.Shapes.ahk - Create a simple gui and draw an ellipse and a rectangle
Here was a wide, seemingly, good example
But, must there be something special installed to make it work?
for examile I got error.
Call to nonexistent function in row 13 (" Gdip.Tutorial.1-Draw.Shapes.ahk") - How do you solve this?
_____________________________
Would be nice to draw a line in "3D", but perhaps not possible in AutoHotkey?
In any case, thank's for your time
//Jan
#5
-
Posted 01 March 2010 - 04:36 PM
If you don't have gdi.ahk in your standard library then you need to uncomment the include gdi to make it work with the ahk file included and they must be in the same directory.
Look at this line in the sample:
Look at this line in the sample:
; Uncomment if Gdip.ahk is not in your standard library ;#Include, Gdip.ahk ;change it to this ; Uncomment if Gdip.ahk is not in your standard library #Include, Gdip.ahk
#6
-
Posted 01 March 2010 - 04:43 PM
Look at this line in the sample:
; Uncomment if Gdip.ahk is not in your standard library ;#Include, Gdip.ahk ;change it to this ; Uncomment if Gdip.ahk is not in your standard library #Include, Gdip.ahk
Thank you, but then I get the following error:
"GDIP.ahk" cannot be opened
Where can I find the file "GDIP.ahk"?
#7
-
Posted 01 March 2010 - 05:10 PM
The same thread as the sample should have been on. <!-- m -->http://www.autohotke...pic.php?t=32238<!-- m --> :lol:
-jpjazzy
-jpjazzy
#8
-
Posted 01 March 2010 - 05:18 PM
Thank you!
Excuse, I missed the large text :-)
What is the "standard library"
Is it c:\program\autohotkey ?
or some other catalog with path to?
//Jan
Excuse, I missed the large text :-)
; Uncomment if Gdip.ahk is not in your standard library ;#Include, Gdip.ahk ;change it to this ; Uncomment if Gdip.ahk is not in your standard library #Include, Gdip.ahk
What is the "standard library"
Is it c:\program\autohotkey ?
or some other catalog with path to?
//Jan
#9
-
Posted 01 March 2010 - 08:35 PM