action scripts (aligment)
hi everyone, there is some script i want to share
i'am not a good script writer but that script works, critiques and fix are welcome
object aligment:
used numpad keys when Numlock is OFF
NumpadDel - h:central aligment v:nochange
NumpadIns - h:nochange v:central aligment
NumpadClear (5) - h:central aligment v:central aligment
NumpadUp - h: central aligment v: on top
... etc
transparency:
Control 0 - No transparency
Control [ - Elliptical transparency + no line
color editor:
Control T - toggle color space in color editor
Control H - toggle fill line color
;=============================================
;ALIGN
;=============================================
#IfWinExist, Xara
NumpadLeft::
IfWinExist, Object Alignment
WinClose
ControlGet, Standart, Style,, BUTTONSTRIP.54, A
ControlClick, BUTTONSTRIP.54, A
IfWinExist, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox2, Object Alignment
Control, Choose, 2, ComboBox2, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox1, Object Alignment
Control, Choose, 1, ComboBox1, Object Alignment
ControlFocus, Apply, Object Alignment
Send {Space}
IfWinExist, Object Alignment
WinClose
return
#IfWinExist, Xara
NumpadRight::
IfWinExist, Object Alignment
WinClose
ControlGet, Standart, Style,, BUTTONSTRIP.54, A
ControlClick, BUTTONSTRIP.54, A
IfWinExist, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox2, Object Alignment
Control, Choose, 4, ComboBox2, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox1, Object Alignment
Control, Choose, 1, ComboBox1, Object Alignment
ControlFocus, Apply, Object Alignment
Send {Space}
IfWinExist, Object Alignment
WinClose
return
#IfWinExist, Xara
NumpadDown::
IfWinExist, Object Alignment
WinClose
ControlGet, Standart, Style,, BUTTONSTRIP.54, A
ControlClick, BUTTONSTRIP.54, A
IfWinExist, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox2, Object Alignment
Control, Choose, 1, ComboBox2, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox1, Object Alignment
Control, Choose, 2, ComboBox1, Object Alignment
ControlFocus, Apply, Object Alignment
Send {Space}
IfWinExist, Object Alignment
WinClose
return
#IfWinExist, Xara
NumpadUp::
IfWinExist, Object Alignment
WinClose
ControlGet, Standart, Style,, BUTTONSTRIP.54, A
ControlClick, BUTTONSTRIP.54, A
IfWinExist, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox2, Object Alignment
Control, Choose, 1, ComboBox2, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox1, Object Alignment
Control, Choose, 4, ComboBox1, Object Alignment
ControlFocus, Apply, Object Alignment
Send {Space}
IfWinExist, Object Alignment
WinClose
return
#IfWinExist, Xara
NumpadHome::
IfWinExist, Object Alignment
WinClose
ControlGet, Standart, Style,, BUTTONSTRIP.54, A
ControlClick, BUTTONSTRIP.54, A
IfWinExist, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox2, Object Alignment
Control, Choose, 2, ComboBox2, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox1, Object Alignment
Control, Choose, 4, ComboBox1, Object Alignment
ControlFocus, Apply, Object Alignment
Send {Space}
IfWinExist, Object Alignment
WinClose
return
#IfWinExist, Xara
NumpadPgDn::
IfWinExist, Object Alignment
WinClose
ControlGet, Standart, Style,, BUTTONSTRIP.54, A
ControlClick, BUTTONSTRIP.54, A
IfWinExist, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox2, Object Alignment
Control, Choose, 4, ComboBox2, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox1, Object Alignment
Control, Choose, 2, ComboBox1, Object Alignment
ControlFocus, Apply, Object Alignment
Send {Space}
IfWinExist, Object Alignment
WinClose
return
#IfWinExist, Xara
NumpadPgUp::
IfWinExist, Object Alignment
WinClose
ControlGet, Standart, Style,, BUTTONSTRIP.54, A
ControlClick, BUTTONSTRIP.54, A
IfWinExist, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox2, Object Alignment
Control, Choose, 4, ComboBox2, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox1, Object Alignment
Control, Choose, 4, ComboBox1, Object Alignment
ControlGet, Standart, Style,, Apply, A
ControlClick, Apply, A
ControlFocus, Apply, Object Alignment
Send {Space}
IfWinExist, Object Alignment
WinClose
return
#IfWinExist, Xara
NumpadEnd::
IfWinExist, Object Alignment
WinClose
ControlGet, Standart, Style,, BUTTONSTRIP.54, A
ControlClick, BUTTONSTRIP.54, A
IfWinExist, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox2, Object Alignment
Control, Choose, 2, ComboBox2, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox1, Object Alignment
Control, Choose, 2, ComboBox1, Object Alignment
ControlFocus, Apply, Object Alignment
Send {Space}
IfWinExist, Object Alignment
WinClose
return
#IfWinExist, Xara
NumpadClear::
IfWinExist, Object Alignment
WinClose
ControlGet, Standart, Style,, BUTTONSTRIP.54, A
ControlClick, BUTTONSTRIP.54, A
IfWinExist, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox2, Object Alignment
Control, Choose, 3, ComboBox2, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox1, Object Alignment
Control, Choose, 3, ComboBox1, Object Alignment
ControlFocus, Apply, Object Alignment
Send {Space}
ControlFocus, Close, Object Alignment
IfWinExist, Object Alignment
WinClose
return
#IfWinExist, Xara
NumpadIns::
IfWinExist, Object Alignment
WinClose
ControlGet, Standart, Style,, BUTTONSTRIP.54, A
ControlClick, BUTTONSTRIP.54, A
IfWinExist, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox2, Object Alignment
Control, Choose, 1, ComboBox2, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox1, Object Alignment
Control, Choose, 3, ComboBox1, Object Alignment
ControlFocus, Apply, Object Alignment
Send {Space}
ControlFocus, Close, Object Alignment
IfWinExist, Object Alignment
WinClose
return
#IfWinExist, Xara
NumpadDel::
IfWinExist, Object Alignment
WinClose
ControlGet, Standart, Style,, BUTTONSTRIP.54, A
ControlClick, BUTTONSTRIP.54, A
IfWinExist, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox2, Object Alignment
Control, Choose, 3, ComboBox2, Object Alignment
ControlGet, combox, FindString, No Change, ComboBox1, Object Alignment
Control, Choose, 1, ComboBox1, Object Alignment
ControlFocus, Apply, Object Alignment
Send {Space}
ControlFocus, Close, Object Alignment
IfWinExist, Object Alignment
WinClose
return
;=============================================
;TRANSPARENCY
;=============================================
;Control 0 - No transparency
#IfWinActive, Xara
^0::
ControlClick, TRANSPTOOLBMP, A
ControlGet, combox, FindString, No transparency, ComboBox4,
Control, Choose, 1, ComboBox4,
send {f2}
return
;Control [ - Elliptical transparency + no line
#IfWinActive, Xara
^[::
ControlClick, TRANSPTOOLBMP, A
ControlGet, combox, FindString, None, ComboBox1,
Control, Choose, 1, ComboBox1,
ControlGet, combox, FindString, No transparency, ComboBox4,
Control, Choose, 1, ComboBox4,
Control, Choose, 5, ComboBox4,
send {f2}
return
;=============================================
;COLOR EDITOR
;=============================================
;Control T - toggle color space in color editor
#IfWinExist, Color editor
^t::
{
ControlGet, combox, FindString, RGB color model, ComboBox1, Color editor
if combox
combox = ComboBox1
else
combox = ComboBox2
if (ColorModel = 2)
colorModel = 3
else
colorModel = 2
Control, Choose, %colorModel%, %combox%, Color editor
}
return
;Control H - toggle fill line color
#IfWinExist, Color editor
^h::
{
ControlGet, combox_f, FindString, Current fill color, ComboBox3, Color editor
combox_f = ComboBox3
if (Value = 1)
Value = 2
else
Value = 1
Control, Choose, %Value%, %combox_f%, Color editor
}
return
;====================================
;====================================
Re: action sripts (aligment)
Am I the only one who doesn't know what this is for? Does this involve some external macro utility?
Re: action sripts (aligment)
Well it's starts by checking if Xara is open so, I'm thinking it's an independent macro profram.
What use to write this Huorn and what software is it meant to run?
Re: action sripts (aligment)
sorry, here is program www.autohotkey.com
Re: action sripts (aligment)
Huorn,
I've used AutoHotKey for a long time, but I've never written any scripts.
I want to try your script, so I'll copy it to NotePad and save it as an AHK file. Then should I execute it to make it available?
Re: action sripts (aligment)
Okay, Huorn. I tried it, and the first problem was that it complained about Line 1 (object alignment). So I commented out all the stuff down to the
;=============================================
;ALIGN
;=============================================
lines. Then I executed it, brought up XaraXtreme, added some shapes, and tried NumPadLeft (with NumLock Off and with NumLock On). Nothing happened.
What am I doing wrong? :confused:
Re: action sripts (aligment)
Quote:
Originally Posted by
cbutton69
Huorn,
I've used AutoHotKey for a long time, but I've never written any scripts.
I want to try your script, so I'll copy it to NotePad and save it as an AHK file. Then should I execute it to make it available?
copy all to default script file (AutoHotkey.ini), after clik on "reload this script" in AutoHotkey tray icon
Re: action scripts (aligment)
I still can't get it to work.