;PICK AND DRAW ;ctrl: PICK SET APPLY !#p:: ;CHECK INPUT: ; Check Edit Objects Window Loop, 5 { ;CHECK FOR WINDOW IfWinExist, Edit Objects Break ;Edit Objects window open? send !ee sleep 30 } WinActivate Edit Objects Mouseclick, left, 220,50 ;Edit Objects Scroll up ; function AnythingSelected? ControlGetText, Cbox1, ComboBox1, Edit Objects ;anything in properties box? IfNotInString, Cbox1, locked ;if no, ask for selection Msgbox, 4096, Pick, Select Objects to Pick Up Properties ;GET PROPERTIES: ; read out Edit Objects Window and store variables IfWinExist, Edit Objects CboxA1 = CboxA2 = CboxA3 = CboxA4 = CboxA5 = CboxA6 = CboxB1 = EditA1 = EditA2 = EditA3 = EditA4 = EditA5 = EditB1 = EditB2 = EditB3 = EditB4 = EditB5 = EditB6 = EditB7 = EditB8 = ControlGetText, CboxA1, ComboBox1, Edit Objects ControlGetText, CboxA2, ComboBox2, Edit Objects ControlGetText, CboxA3, ComboBox3, Edit Objects ControlGetText, CboxA4, ComboBox4, Edit Objects ControlGetText, CboxA5, ComboBox5, Edit Objects ControlGetText, CboxA6, ComboBox6, Edit Objects ControlGetText, EditA1, Edit1, Edit Objects ControlGetText, EditA2, Edit2, Edit Objects ControlGetText, EditA3, Edit3, Edit Objects ControlGetText, EditA4, Edit4, Edit Objects ControlGetText, EditA5, Edit5, Edit Objects WinActivate Edit Objects Mouseclick, left, 220,190 ;Edit Objects Scroll down ControlGetText, CboxB1, ComboBox1, Edit Objects ControlGetText, EditB1, Edit1, Edit Objects ControlGetText, EditB2, Edit2, Edit Objects ControlGetText, EditB3, Edit3, Edit Objects ControlGetText, EditB4, Edit4, Edit Objects ControlGetText, EditB5, Edit5, Edit Objects ControlGetText, EditB6, Edit6, Edit Objects ControlGetText, EditB7, Edit7, Edit Objects ControlGetText, EditB8, Edit8, Edit Objects WinActivate Edit Objects Mouseclick, left, 220,50 ;Edit Objects Scroll up ;MsgBox EditB8 is %EditB8%, CBoxB1 is %CBoxB1% ;DETERMINE OBJECT TYPE: ;groep? Geen enkele Edit bestaat ;Wall: page 2 Edit8 bestaat niet, Edit7 bevat ° ;line: page 2 Edit8 bestaat niet, Edit7 bevat ° , CboxB1 bevat none ;circle: page 2 Edit8 bestaat niet, Edit7 bevat . ;text: page 2 edit8 bestaat en bevat enkel letters (Font) ;arc: page 2 edit8 bestaat en bevat enkel cijfers (Radius) ; If EditA1 = { Gosub, GetPropGroup Return } If EditB8 = { IfInString, EditB7, ° { IfInstring, CboxB1, none { Gosub GetPropLine Return } Else { Gosub GetPropWall Return } } Else { Gosub GetPropCircle Return } } Else { IfInString, EditB8, . { Gosub GetPropArc Return } Else { Gosub GetPropText Return } } GetPropGroup: type = Group locked = %CboxA1% layer = %CboxA2% color = %CboxA3% controlpts = %CboxA4% ; MsgBox het is een Groep, %locked%, layer %layer%, color %color%, %controlpts% Gosub SetOrDraw Return GetPropLine: type = Line locked = %CboxA1% layer = %CboxA2% color = %CboxA3% pattern = %CboxA4% weight = %CboxA5% controlpts = %CboxA6% ;MsgBox het is een Lijn, %locked%, layer %layer%, color %color%, pattern %pattern%, weight %weight%, controlpoints %controlpts% Gosub SetOrDraw Return GetPropWall: type = Wall locked = %CboxA1% layer = %CboxA2% color = %CboxA3% pattern = %CboxA4% weight = %CboxA5% controlpts = %CboxA6% thickness = %EditB5% ;MsgBox het is een Wall, %locked%, layer %layer%, color %color%, pattern %pattern%, weight %weight%, thickness %thickness%, controlpoints %controlpts% Gosub SetOrDraw Return GetPropCircle: type = Circle locked = %CboxA1% layer = %CboxA2% color = %CboxA3% pattern = %CboxA4% weight = %CboxA5% controlpts = %CboxA6% ;MsgBox het is een Cirkel, %locked%, layer %layer%, color %color%, pattern %pattern%, weight %weight%, controlpoints %controlpts% Gosub SetOrDraw Return GetPropArc: type = Arc locked = %CboxA1% layer = %CboxA2% color = %CboxA3% pattern = %CboxA4% weight = %CboxA5% controlpts = %CboxA6% ;MsgBox het is een Boog, %locked%, layer %layer%, color %color%, pattern %pattern%, weight %weight%, controlpoints %controlpts% Gosub SetOrDraw Return GetPropText: type = Text locked = %CboxA1% layer = %CboxA2% color = %CboxA3% controlpts = %CboxA4% width = %EditA4% height = %EditB2% size = %EditB7% font = %EditB8% ;MsgBox het is een Tekst, %locked%, layer %layer%, color %color%, size %size%, font %font%, controlpoints %controlpts%, width %width%, height %height%. Gosub SetOrDraw Return SETORDRAW: SetTimer, ChangeButtonNames, 50 MsgBox 4163, EyeDropper, Object is %type%, `n%locked%, `nlayer %layer%, `ncolor %color%, `nthickness %thickness%, `nsize %size%, `nfont %font%, `ncontrolpoints %controlpts%, `nwidth %width%, `nheight %height%`n `nDraw cloned geometry with these settings, `nMatch Objects (settings won't change) or `nMatch drawing Settings? IfMsgBox, YES { Gosub DRAW Exitapp } IfMsgBox, NO { ToolTip, Alt +Win + Left click Objects to Match. , 1, 1 Hotkey, !#lbutton, MATCH ; stelt lbutton in als hotkey voor label "MATCH" WinActivate Vellum3D Return } Gosub SET ChangeButtonNames: IfWinNotExist, EyeDropper return ; Keep waiting. SetTimer, ChangeButtonNames, off WinActivate ControlSetText, &Yes, &Draw ControlSetText, &No, &Match ControlSetText, &Cancel, &Set return Return SET: Winactivate, Vellum3D send {F3} ;deselect all sleep 100 ;nodig? send {F2} ; SET COLOR Loop, 5 { ;CHECK FOR WINDOW IfWinExist, Pen Colors Break ;window open? send !pco sleep 30 } WinActivate Pen Colors Mouseclick, left, 253, 41, 3 ;scroll up if necessary ;color = Blue Gray (for testing) If color = Black { WinActivate, Pen Colors ;enable color Mouseclick, left, 43,37, 2 } If color = Red { WinActivate, Pen Colors ;enable color Mouseclick, left, 43,52, 2 } If color = Yellow { WinActivate, Pen Colors ;enable color Mouseclick, left, 43,68, 2 } If color = Green { WinActivate, Pen Colors ;enable color Mouseclick, left, 43,89, 2 } If color = Cyan { WinActivate, Pen Colors ;enable color Mouseclick, left, 43,98, 2 } If color = Blue { WinActivate, Pen Colors ;enable color Mouseclick, left, 43,118, 2 } If color = Magenta { WinActivate, Pen Colors ;enable color Mouseclick, left, 43,135, 2 } If color = Apricot { WinActivate, Pen Colors ;enable color Mouseclick, left, 43,153, 2 } If color = Aquamarine { WinActivate, Pen Colors ;enable color Mouseclick, left, 43,165, 2 } If color = Bittersweet { WinActivate, Pen Colors ;enable color Mouseclick, left, 43,180, 2 } If color = Blue Green { WinActivate, Pen Colors ;enable color Mouseclick, left, 43,198, 2 } If color = Blue Gray { WinActivate, Pen Colors Mouseclick, left, 253,193, scroll down Mouseclick, left, 43, 86, 2 ;make color active Mouseclick, left, 253, 41, 3 ;scroll up } If color = Blue Violet { Mouseclick, left, 253,193, scroll down Mouseclick, left, 259, 159, ;scroll down Mouseclick, left, 43, 101, 2 ;make color active Mouseclick, left, 253, 41, 3 ;scroll up } If color = Burnt Sienna { Mouseclick, left, 253,193, scroll down Mouseclick, left, 259, 159, ;scroll down Mouseclick, left, 43, 120, 2 ;make color active Mouseclick, left, 253, 41, 3 ;scroll up } If color = Gold { Mouseclick, left, 253,193, scroll down Mouseclick, left, 259, 159, ;scroll down Mouseclick, left, 43, 132, 2 ;make color active Mouseclick, left, 253, 41, 3 ;scroll up } If color = Gray { Mouseclick, left, 253,193, scroll down Mouseclick, left, 259, 159, ;scroll down Mouseclick, left, 43, 150, 2 ;make color active Mouseclick, left, 253, 41, 3 ;scroll up } If color = Brown { Mouseclick, left, 253,193, scroll down Mouseclick, left, 259, 159, ;scroll down Mouseclick, left, 43, 167, 2 ;make color active Mouseclick, left, 253, 41, 3 ;scroll up } If color = Silver { Mouseclick, left, 253,193, scroll down Mouseclick, left, 259, 159, ;scroll down Mouseclick, left, 43, 182, 2 ;make color active Mouseclick, left, 253, 41, 3 ;scroll up } If color = White { Mouseclick, left, 253,193, scroll down Mouseclick, left, 259, 159, ;scroll down Mouseclick, left, 43, 199, 2 ;make color active Mouseclick, left, 253, 41, 3 ;scroll up } ; Set Layer Loop, 5 { ;CHECK FOR WINDOW IfWinExist, Layers Break ;window open? Winactivate Vellum3D send !ll sleep 30 } Winactivate, Layers Mouseclick, left, 145, 34, 4 scroll up IfInString, layer, 0 { WinActivate, Layers ;enable Layer Mouseclick, left, 130, 37, 2 } IfInString, layer, 1 { WinActivate, Layers ;enable Layer Mouseclick, left, 130, 52, 2 } IfInString, layer, 2 { WinActivate, Layers ;enable Layer Mouseclick, left, 130, 68, 2 } IfInString, layer, 3 { WinActivate, Layers ;enable Layer Mouseclick, left, 130, 89, 2 } IfInString, layer, 4 { WinActivate, Layers ;enable Layer Mouseclick, left, 130, 98, 2 } IfInString, layer, 5 { WinActivate, Layers ;enable Layer Mouseclick, left, 130, 118, 2 } IfInString, layer, 6 { WinActivate, Layers ;enable Layer Mouseclick, left, 144, 105, ;scroll down Mouseclick, left, 130, 55, 2 ;make layer active Mouseclick, left, 144, 44, ;scroll up } IfInString, layer, 7 { WinActivate, Layers ;enable Layer Mouseclick, left, 144, 105, ;scroll down Mouseclick, left, 130, 70, 2 ;make layer active Mouseclick, left, 144, 44, ;scroll up } IfInString, layer, 8 { WinActivate, Layers ;enable Layer Mouseclick, left, 144, 105, ;scroll down Mouseclick, left, 130, 87, 2 ;make layer active Mouseclick, left, 144, 44, ;scroll up } IfInString, layer, 9 { WinActivate, Layers ;enable Layer Mouseclick, left, 144, 105, ;scroll down Mouseclick, left, 130, 103, 2 ;make layer active Mouseclick, left, 144, 44, ;scroll up } IfInString, layer, construction { WinActivate, Layers ;enable Layer Mouseclick, left, 144, 105, ;scroll down Mouseclick, left, 130, 119, 2 ;make layer active Mouseclick, left, 144, 44, ;scroll up } IfInString, layer, dim { WinActivate, Layers ;enable Layer Mouseclick, left, 144, 105, 2 ;scroll down Mouseclick, left, 130, 55, 2 ;make layer active Mouseclick, left, 144, 44, 2 ;scroll up } IfInString, layer, hatch { WinActivate, Layers ;enable Layer Mouseclick, left, 144, 105, 2 ;scroll down Mouseclick, left, 130, 70, 2 ;make layer active Mouseclick, left, 144, 44, 2 ;scroll up } IfInString, layer, faec { WinActivate, Layers ;enable Layer Mouseclick, left, 144, 105, 2 ;scroll down Mouseclick, left, 130, 87, 2 ;make layer active Mouseclick, left, 144, 44, 2 ;scroll up } IfInString, layer, rwa { WinActivate, Layers ;enable Layer Mouseclick, left, 144, 105, 2 ;scroll down Mouseclick, left, 130, 103, 2 ;make layer active Mouseclick, left, 144, 44, 2 ;scroll up } IfInString, layer, vwa { WinActivate, Layers ;enable Layer Mouseclick, left, 144, 105, 2 ;scroll down Mouseclick, left, 130, 119, 2 ;make layer active Mouseclick, left, 144, 44, 2 ;scroll up } IfInString, layer, tekst { WinActivate, Layers ;enable Layer Mouseclick, left, 144, 105, 3 ;scroll down Mouseclick, left, 130, 99, 2 ;make layer active Mouseclick, left, 144, 44, 3 ;scroll up } ;Else ; MsgBox Layer %layer% could not be set by mouse ;MsgBox pattern: %pattern% ; Set Pattern WinActivate, Vellum3D If pattern = Solid Send !pps If pattern = Dotted Send !ppd If pattern = Center Send !ppc If pattern = Dashed Send !ppa If pattern = Hidden Send !pph If pattern = Phantom Send !ppp If pattern = Dashdot Send !ppo If pattern = Border Send !ppb If pattern = Divide Send !ppi If pattern = Cutting Send !ppu If pattern = Stitch Send !ppt ;MsgBox weight: %weight% ; Set Weight WinActivate, Vellum3D If weight = 0.05mm Send !pw0 If weight = 0.13 Send !pw1 If weight = 0.25 Send !pw2 If weight = 0.41 Send !pw4 If weight = 0.51 Send !pw5 If weight = 0.81 Send !pw8 If weight = 1.27 Send !pw7 ; Set Text Loop, 5 { ;CHECK FOR WINDOW IfWinExist, Character Format Break ;window open? Winactivate Vellum3D send !tfm sleep 30 } Winactivate, Character Format Control, ChooseString, %font%, ComboBox1, Character Format Control, ChooseString, %size%, Edit1, Character Format WinActivate, Vellum3D return DRAW: ;2do: save old settings Gosub Set Winactivate Vellum3D If type = Wall send ^+w If type = Line send ^w If type = Circle send ^+c If type = Arc send ^+a If type = Text send ^+t Else MsgBox 4096, EyeDropper, Eyedropper has no clue what to draw. Oh well, why don't I self-destruct?,1 Return MATCH: Mouseclick, left ;Select object MouseGetPos, xSel, ySel, sleep, 30 WinActivate Edit Objects Mouseclick, left, 220,50 ;Edit Objects Scroll up Control, ChooseString, %locked%, ComboBox1, Edit Objects Control, ChooseString, %layer%, ComboBox2, Edit Objects Control, ChooseString, %color%, ComboBox3, Edit Objects Control, ChooseString, %pattern%, ComboBox4, Edit Objects Control, ChooseString, %weight%, ComboBox5, Edit Objects Controlclick, &Apply, Edit Objects Winactivate Vellum3D Mousemove, xSel, ySel send {F3} ;deselect send {F2} ;2do: ctrl win Lbutton up instellen om marquee te selecteren ;Tooltip ; Return