AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to make a window an ellipse with winset,region

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
aaffe



Joined: 17 May 2007
Posts: 66

PostPosted: Tue Jan 15, 2008 5:23 pm    Post subject: how to make a window an ellipse with winset,region Reply with quote

Hallo,
in the help of ahk I read that you can make a window an ellipse by Winset,Region, E
or an Rectangle by
Winset, Region, R

Is it right that you can make the shape of a window an ellipse or an rectangle? I tried everything, but my windows didnīt react to this command...
I tried the following:
Code:

Gui,Show,w599 h599,TEST1
Winset,Region,E,TEST1
Gui,Restore

...but my window didnīt morph to an ellipse. What am I doing wrong?
Or did I understand the effect of this command wrong?

Thanks for help!
Back to top
View user's profile Send private message
Murp|e



Joined: 12 Jan 2007
Posts: 240
Location: Norway

PostPosted: Tue Jan 15, 2008 8:10 pm    Post subject: Reply with quote

I've never used the winset, region command so I had to check. This code works fine for me:
Code:
Run, notepad, , , OutputVarPID
sleep, 1500
;WinSet, Region, 50-0 W200 H250, ahk_pid %OutputVarPID%
WinSet, Region, 50-0 W200 H250 E, ahk_pid %OutputVarPID%
msgbox, Errorlevel: %errorlevel%

Comments to your code:
Code:
Gui,Show,w599 h599,TEST1
Winset,Region,E,TEST1 ;You've left out all of the numbers that define the elipse. You need to define Wn, Hn and X-Y. See the documentation.
Gui,Restore ;You probably mean "Gui, Show, restore" but you don't seem to need it for this purpose.

Try this:
Code:
Gui, Add, Text, x26 y17 w340 h160 , THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST. THIS IS A TEST.
Gui, Show, w599 h599, TEST1
WinSet, Region, 50-0 W200 H250 E, TEST1
msgbox, ErrorLevel is set to 1 upon failure and 0 upon success.`nErrorlevel:%errorlevel%
Return
Back to top
View user's profile Send private message Visit poster's website
aaffe



Joined: 17 May 2007
Posts: 66

PostPosted: Wed Jan 16, 2008 9:10 am    Post subject: Reply with quote

Tank you very much!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group