自定icon問題

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Ivan
Posts: 16
Joined: 27 Jun 2018, 10:02

自定icon問題

11 Jul 2018, 21:41

我將ahk檔及自定的icon图示檔放在同一位置,如放在桌面上.當我打開這个ahk檔時,我的自定图示會出現在,我的這个图示會代替原來的"H"图示

但我將這个ahk檔及自定图示放在啟動夾后,隨我重新開啟電腦,我的自定图示不會出現,反而"H"出現

我在我的ahk檔的開端位置加了如下code:
ifexist, icon.ico
{
MENU TRAY, Icon, icon.ico
}


請問各位幫忙
Spark
Posts: 80
Joined: 04 Jan 2017, 02:22

Re: 自定icon問題

12 Jul 2018, 00:04

Sorry, i use google translate to understand your question..

how about this..
put your AHK shortcut (*.INK File) into startup folder
A_AhkUser
Posts: 1147
Joined: 06 Mar 2017, 16:18
Location: France
Contact:

Re: 自定icon問題

12 Jul 2018, 00:28

The file is assumed to be in %A_WorkingDir% if an absolute path isn't specified. (如果未指定绝对路径则假定 File 在 %A_WorkingDir% 中.)

Code: Select all

#Persistent
SetWorkingDir % A_ScriptDir ; 改变脚本的当前工作目录.
if (FileExist("icon.ico"))
	MENU TRAY, Icon, icon.ico
my scripts
Ivan
Posts: 16
Joined: 27 Jun 2018, 10:02

Re: 自定icon問題

12 Jul 2018, 21:57

Spark wrote:Sorry, i use google translate to understand your question..

how about this..
put your AHK shortcut (*.INK File) into startup folder
I haven't touch ink file, what is it and how can I change ico file into ink file
Ivan
Posts: 16
Joined: 27 Jun 2018, 10:02

Re: 自定icon問題

12 Jul 2018, 22:01

A_AhkUser wrote:The file is assumed to be in %A_WorkingDir% if an absolute path isn't specified. (如果未指定绝对路径则假定 File 在 %A_WorkingDir% 中.)

Code: Select all

#Persistent
SetWorkingDir % A_ScriptDir ; 改变脚本的当前工作目录.
if (FileExist("icon.ico"))
	MENU TRAY, Icon, icon.ico
我试成功了,但由于我把图示档一拼放在ahk档的同启动目录,这使这个图示每次开机时都会一拼打开,被小画家打开,怎样解决?
Spark
Posts: 80
Joined: 04 Jan 2017, 02:22

Re: 自定icon問題

15 Jul 2018, 21:57

Ivan wrote:
Spark wrote:Sorry, i use google translate to understand your question..

how about this..
put your AHK shortcut (*.INK File) into startup folder
I haven't touch ink file, what is it and how can I change ico file into ink file
Right click your Project.ahk file and Choose "Create shortcut" (you can rename it)
copy your "shortcut" file into startup folder (no need to copy ahk and your picture file)

HTH
Ivan
Posts: 16
Joined: 27 Jun 2018, 10:02

Re: 自定icon問題

16 Jul 2018, 21:24

Spark wrote:
Ivan wrote:
Spark wrote:Sorry, i use google translate to understand your question..

how about this..
put your AHK shortcut (*.INK File) into startup folder
I haven't touch ink file, what is it and how can I change ico file into ink file
Right click your Project.ahk file and Choose "Create shortcut" (you can rename it)
copy your "shortcut" file into startup folder (no need to copy ahk and your picture file)

HTH
Your idea is great, this avoid opening the pic. file at the same time!!! Thank You!!!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Descolada, Fredrik F, Google [Bot], maxkill, RandomBoy, ShatterCoder and 329 guests