<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Быстрое меню]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5001&amp;type=atom" />
	<updated>2010-10-06T22:21:12Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=5001</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Быстрое меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40031#p40031" />
			<content type="html"><![CDATA[<p>Всем спасибо!=)<br />Теперь я доволен, ибо можно легко из этого сделать нормальный скрипт, который обычный пользователь настроит. Можно даже простинькие настройки прифигачить, так как надо заполнить только два массива. Спасибо<br /></p><div class="codebox"><pre><code>MButton &amp; LButton::
Gui, +AlwaysOnTop -SysMenu -Caption
Gui, Color, 003867
ql_img1:=&quot;twitter.jpg&quot;
ql_img2:=&quot;vkontakte.jpg&quot;
ql_img3:=&quot;rutracker.jpg&quot;
ql_img4:=&quot;fto.jpg&quot;
ql_img5:=&quot;empty&quot;
ql_img6:=&quot;google.jpg&quot;
ql_img7:=&quot;yandex.jpg&quot;
ql_img8:=&quot;lastfm.jpg&quot;
ql_img9:=&quot;beeline.jpg&quot;

Loop, 9{
the_pic:=ql_img%A_Index%
if(the_pic!=&quot;empty&quot;){
aind:=A_Index-1
the_ind:=aind
the_ind/=3
ostatok:=aind-(the_ind*3)
the_x:=1+(ostatok*101)
the_y:=1+(the_ind*101)
Gui, Add, Picture, x%the_x% y%the_y% w100 h100 hwndP%A_Index%, R:\Gadget\AHK\Quiklink\%the_pic%
}
}
CoordMode, Mouse, Screen
MouseMove, (A_ScreenWidth/2), (A_ScreenHeight/2)
CoordMode, Mouse, Relative

Gui, Show,Center h306 w306, Quick Link Menu
return

return

MButton &amp; LButton UP::
ql_link1=http://twitter.com
ql_link2=http://vkontakte.ru
ql_link3=http://rutracker.org
ql_link4=http://free-torrents.org
ql_link5=
ql_link6=http://google.com
ql_link7=http://yandex.ru
ql_link8=http://www.lastfm.ru/user/funtaps/charts?rangetype=week&amp;subtype=tracks
ql_link9=http://www.beeline.ru/sms/index.wbp
MouseGetPos,,,, VarControl, 2
Gui, Destroy
Loop, 9{
if(VarControl = P%A_index%){
the_link:=ql_link%A_Index%
Run, %the_link%
}
}
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[funtaps]]></name>
			</author>
			<updated>2010-10-06T22:21:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40031#p40031</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Быстрое меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40022#p40022" />
			<content type="html"><![CDATA[<p><a href="http://www.autohotkey.com/docs/commands.htm">Вот</a> всё, что есть на сегодняшний день.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2010-10-06T18:20:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40022#p40022</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Быстрое меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=40020#p40020" />
			<content type="html"><![CDATA[<p>а swtch в AHK нету?</p>]]></content>
			<author>
				<name><![CDATA[funtaps]]></name>
			</author>
			<updated>2010-10-06T17:55:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=40020#p40020</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Быстрое меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=39999#p39999" />
			<content type="html"><![CDATA[<p>В параметрах картинок указываешь переменные, в которых будут сохраняться их идентификаторы — <em>hwndVar1 — hwndVar8</em>, в команде <em>MouseGetPos</em> указываешь переменную, в которой будет сохраняться идентификатор контрола, затем сравниваешь. Пример:<br /></p><div class="codebox"><pre><code>   Gui, Add, Text, +0x6 x0 y0 w100 h100 hwndWhite
   Gui, Add, Text, +0x4 x100 y0 w100 h100 hwndBlack
   Gui, Show, w200 h100
   Return

MButton Up::
   MouseGetPos,,,, VarControl, 2
   if (VarControl = White)
      MsgBox Белый квадрат
   if (VarControl = Black)
      MsgBox Чёрный квадрат
   Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2010-10-06T10:49:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=39999#p39999</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Быстрое меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=39993#p39993" />
			<content type="html"><![CDATA[<p>Благодаря teadrinker написал такую штуку:<br /></p><div class="codebox"><pre><code>MButton &amp; LButton::
Gui, +AlwaysOnTop -SysMenu -Caption
/*
Gui, Color, 2F7B80
Gui, Add, Picture, x20 y20 w200 h200, R:\Gadget\AHK\Quiklink\twitter.jpg
Gui, Add, Picture, x240 y20 w200 h200, R:\Gadget\AHK\Quiklink\vkontakte.jpg
Gui, Add, Picture, x460 y20 w200 h200, R:\Gadget\AHK\Quiklink\rutracker.jpg
Gui, Add, Picture, x20 y240 w200 h200, R:\Gadget\AHK\Quiklink\fto.jpg
Gui, Add, Picture, x460 y240 w200 h200, R:\Gadget\AHK\Quiklink\google.jpg
Gui, Add, Picture, x20 y460 w200 h200, R:\Gadget\AHK\Quiklink\yandex.jpg
Gui, Add, Picture, x240 y460 w200 h200, R:\Gadget\AHK\Quiklink\lastfm.jpg
Gui, Add, Picture, x460 y460 w200 h200, R:\Gadget\AHK\Quiklink\beeline.jpg
*/
Gui, Add, Picture, x0 y0 w680 h680, R:\Gadget\AHK\Quiklink\bg.jpg
CoordMode, Mouse, Screen
MouseMove, (A_ScreenWidth/2), (A_ScreenHeight/2)
CoordMode, Mouse, Relative

Gui, Show,Center h680 w680, Quick Link Menu
return

return

MButton &amp; LButton UP::
MouseGetPos, mouse_x, mouse_y
Gui, Destroy
if(mouse_x&gt;10&amp;&amp;mouse_x&lt;670&amp;&amp;mouse_y&gt;10&amp;&amp;mouse_y&lt;670){
if(mouse_y&lt;230){
if(mouse_x&lt;230){
Run, http://twitter.com
}
else if(mouse_x&lt;460){
Run, http://vkontakte.ru
}
else{
Run, http://rutracker.org
}
}
else if(mouse_y&lt;460){
if(mouse_x&lt;230){
Run, http://free-torrents.org
}
else if(mouse_x&gt;460){
Run, http://google.com
}
}
else{
if(mouse_x&lt;230){
Run, http://yandex.ru
}
else if(mouse_x&lt;460){
Run, http://www.lastfm.ru/user/funtaps/charts?rangetype=week&amp;subtype=tracks
}
else{
Run, http://www.beeline.ru/sms/index.wbp
}
}
}
return</code></pre></div><p>Долго возился с MouseGetPos - там есть выходная переменная OutputVarControl<br />Может можно сделать, чтобы она определяла над какой картинкой (если делать восемь картинок, а не одну) сейчас мышка.<br />Мне бы хотелось функцию привязывать не к координате мышки, а к картинке, чтобы можно было удобнее настраивать менюшку: поменял местами две картинки, например, и функции соответственно тоже нормально работают.</p>]]></content>
			<author>
				<name><![CDATA[funtaps]]></name>
			</author>
			<updated>2010-10-06T09:30:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=39993#p39993</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Быстрое меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=39984#p39984" />
			<content type="html"><![CDATA[<p>Необязательно загружать восемь картинок, достаточно загрузить одну целиком, которая выглядит, как в первом посте. Метка перехода не нужна. Затем назначить горячую клавишу <em>MBUtton Up::</em> на проверку координат курсора, закрытие окна и вызова нужного адреса, в зависимости от полученных координат.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2010-10-06T07:46:32Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=39984#p39984</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Быстрое меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=39979#p39979" />
			<content type="html"><![CDATA[<p>Спасибо большое!<br />Но осталась пара вопросов:<br />Как сделать, чтобы при нажатии оконо показывалось, а при отжатии закрывалось?<br />И событие, соответственно должны выполнятся не по клику мышки, а при отжатии кнопки в зависимости от того, где стоит мышка.<br />Код сейчас:<br /></p><div class="codebox"><pre><code>#MButton::
Gui, +AlwaysOnTop -SysMenu -Caption
Gui, Color, 2F7B80
Gui, Add, Picture, x20 y20 w200 h200 gPTwit, R:\Gadget\AHK\Quiklink\twitter.jpg
Gui, Add, Picture, x240 y20 w200 h200 gPVk, R:\Gadget\AHK\Quiklink\vkontakte.jpg
Gui, Add, Picture, x460 y20 w200 h200 gPRut, R:\Gadget\AHK\Quiklink\rutracker.jpg
Gui, Add, Picture, x20 y240 w200 h200 gPFto, R:\Gadget\AHK\Quiklink\fto.jpg
Gui, Add, Picture, x460 y240 w200 h200 gPGoog, R:\Gadget\AHK\Quiklink\google.jpg
Gui, Add, Picture, x20 y460 w200 h200 gPYand, R:\Gadget\AHK\Quiklink\yandex.jpg
Gui, Add, Picture, x240 y460 w200 h200 gPLast, R:\Gadget\AHK\Quiklink\lastfm.jpg
Gui, Add, Picture, x460 y460 w200 h200 gPBee, R:\Gadget\AHK\Quiklink\beeline.jpg

CoordMode, Mouse, Screen
MouseMove, (A_ScreenWidth/2), (A_ScreenHeight/2)
CoordMode, Mouse, Relative

Gui, Show,Center h680 w680, Quick Link Menu
return

PTwit:
Run http://twitter.com
Gui, Destroy
return
PVk:
Run http://vkontakte.ru
Gui, Destroy
return
PRut:
Run http://rutracker.org
Gui, Destroy
return
PFto:
Run http://free-torrents.org
Gui, Destroy
return
PGoog:
Run http://google.com
Gui, Destroy
return
PYand:
Run http://yandex.ru
Gui, Destroy
return
PLast:
Run http://www.lastfm.ru/user/funtaps/charts?rangetype=week&amp;subtype=tracks
Gui, Destroy
return
PBee:
Run http://www.beeline.ru/sms/index.wbp
Gui, Destroy
return

return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[funtaps]]></name>
			</author>
			<updated>2010-10-06T06:51:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=39979#p39979</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Быстрое меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=39975#p39975" />
			<content type="html"><![CDATA[<p>Начните разбираться с этого.<br /></p><div class="codebox"><pre><code>Gui, Add, Picture, x20 y20 w100 h100 gS001, C:\windows\winnt.bmp
Gui, Show, x131 y91 h377 w477, New GUI Window
Return

S001:
Run, http://Theadress.com
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2010-10-06T04:03:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=39975#p39975</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Быстрое меню]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=39971#p39971" />
			<content type="html"><![CDATA[<p>Суть такая: хочется, чтобы при нажатии, например, пуск-средней кнопки, выфигачивалась менюшка типа такой <span class="postimg"><img src="http://i10.fastpic.ru/big/2010/1006/15/5844761661ea41ccf86709cabc73dd15.jpg" alt="http://i10.fastpic.ru/big/2010/1006/15/5844761661ea41ccf86709cabc73dd15.jpg" /></span><br />причём так, чтобы мышь была посередине. (Либо мышь пихнуть в центр экрана, либо менюшку приурочить к мыши), а при отжатии, делалось </p><div class="codebox"><pre><code>Run, http://Theadress.com</code></pre></div><p>если мышь была на картинке.<br />Пытался сделать с помощью GUI, но, так как не разобрался в этом, получается нелицеприятный вид и громоздкий код.<br />Собственно вопросы, как сделать по цивильному &quot;при нажатии&quot; и &quot;при отжатии&quot;, и как создать такую менюшку</p>]]></content>
			<author>
				<name><![CDATA[funtaps]]></name>
			</author>
			<updated>2010-10-05T20:48:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=39971#p39971</id>
		</entry>
</feed>
