Code: Select all
InputBox,UserPath
Run,%UserPath%
如果无效则提示重新输入。
Moderators: tmplinshi, arcticir
Code: Select all
InputBox,UserPath
Run,%UserPath%
Code: Select all
Loop
InputBox, UserPath
Until, FileExist(UserPath)
Run, %UserPath%
Code: Select all
Gui,2:font,s10,Verdana
Gui,2:add,button , x10 y45 h25 w100 gA1,Run
Gui,2:add,edit , x10 y5 h30 w350 ve1 ,c:\test\test.mp3
Gui,2:show, x10 y10 h75 w400 ,Select File Test
return
2Guiclose:
exitapp
a1:
Gui,2:submit,nohide
e1=%e1%
ifexist,%e1%
run,%e1%
else
{
Guicontrol,2:,e1
Guicontrol,2:,e1,Path not exist
sleep,5000
Guicontrol,2:,e1
}
return
Code: Select all
;-------- saved at Mittwoch, 1. April 2015 09:04:40 -----------
Gui,2:font,s10,Verdana
Gui,2:add,button , x10 y120 h25 w100 gSelectx,SelectFolder
Gui,2:add,listbox, x10 y5 h100 w950 vlb1 gA1 +wrap,
Gui,2:show, x10 y10 h160 w1000 ,Select Folder Test
return
2Guiclose:
exitapp
a1:
;if (A_GuiEvent = "DoubleClick")
if (A_GuiEvent = "Normal")
{
Gui,2:Submit,nohide
ifexist,%lb1%
run,%lb1%
return
}
return
selectx:
Extensions := "mp3,mp4"
preselect=%a_desktop% ;- search folder from here with contents 'extensions'
FileSelectFolder,rootfolder,%PRESELECT%
if rootfolder=
return
Loop,%rootFolder%\*.*,2,1
{
Loop,%A_LoopFileFullPath%\*.*,0,0
{
If A_LoopFileExt in %Extensions%
{
e .= A_LoopFileDir . "|"
break
}
}
}
Guicontrol,2:,lb1,| ;- clear listbox
if e<>
Guicontrol,2:,lb1,%e%
else
Guicontrol,2:,lb1,No folders found with files-extension= %extensions%
e=
return
;=========== end script ======================
Users browsing this forum: No registered users and 51 guests