 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Acris
Joined: 18 Jan 2010 Posts: 193 Location: Switzerland
|
Posted: Fri Mar 19, 2010 12:01 pm Post subject: Tab : uncheck box |
|
|
Hello everybody
coucou Gary, Hugov
I try to uncheck a box if my file is detected but I can not
| Code: | Gui, Add, Tab, gMytab vMyTab w625 h400, Format|Tools
Gui, Tab, Tools
Gui, Add, Checkbox, vChkGRUB Checked%GRUB%, %INSTALLGRUB%
Gui, Add, Button, gInstall, Install
Gui, Tab
Gui, Show,w640, RescueUSB
Return
^!r::Reload
Mytab:
Gui, Submit, Nohide
if Mytab = Tools
{
ifExist, %varletterdrive%grldr
{
;uncheck box
; ChkGRUB=0 Not Work
; ChkGRUB= Not Work
;GuiControl,1:, ChkGRUB, %INSTALLGRUB% Not work
; Gui, Add, Checkbox, vChkGRUB , %INSTALLGRUB% Not work
mgs error variable exists.
}
}
Install:
gui, submit,Nohide
if ChkGRUB = 1
{
IFNotExist, %vardriveletter%menu.lst
{
SB_SetText(FORMATINGIN)
RunWait,%comspec% /c RMPARTUSB.exe DRIVE=%Drivenum% XP FAT32 2PTN VOLUME=RESCUEUSB, ,HIDE
SB_SetText(ENDTO)
Sleep, 5000
SB_SetText("")
}
SB_SetText(COPFILES)
Loop,console\*,0,1
anzahl:=A_INDEX
Loop,console\*,0,1
{
file:=A_LoopFileFullPath
file:=Regexreplace(file,".*console\\(.*)","$1")
StringLeft,Klammer,file,1
If Klammer!=\
file=\%file%
file=%vardriveletter%%file%
files.=file . "`n"
;if A_LoopFileName not in usbflash,plpbt.bin,whatever.xpm.gz,boot.ini,BOOTFONT.BIN,NTLDR,NTDETECT.COM,message
FileCopy,%A_LoopFileFullPath%,%file%,1
zahl:=(100 / anzahl) * A_INDEX
Progress, %zahl%, %a_loopfilename%, Copies des fichiers
Sleep, 50
}
Progress,Off
SB_SetText(ENDOF)
Sleep, 2000
SB_SetText("")
} |
|
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2212 Location: switzerland
|
Posted: Fri Mar 19, 2010 12:29 pm Post subject: |
|
|
not "checked" really, just a small example
| Code: | Gui, Add, Checkbox, vChkGRUB gA1 Checked,
Gui, Show,w100, RescueUSB
Return
Guiclose:
exitapp
A1:
guicontrolget,chkgrub
if chkgrub = 0
msgbox,NOT checked
else
msgbox,Checked
return
|
|
|
| Back to top |
|
 |
Acris
Joined: 18 Jan 2010 Posts: 193 Location: Switzerland
|
Posted: Fri Mar 19, 2010 12:46 pm Post subject: |
|
|
| I do not absolutely controlled the presence of the file if it is uncheck the bo |
|
| Back to top |
|
 |
Acris
Joined: 18 Jan 2010 Posts: 193 Location: Switzerland
|
Posted: Fri Mar 19, 2010 1:36 pm Post subject: |
|
|
Grub is checked by default.
I do not think your solution is good
I really do not see how to introduce it in my code |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2212 Location: switzerland
|
Posted: Fri Mar 19, 2010 7:04 pm Post subject: |
|
|
maybe I don't understand
this checks if file exist (test.txt when Tab tools)
| Code: | Gui, Add, Tab, gMytab vMyTab w625 h400, Format|Tools
Gui, Tab, Tools
Gui, Add, Checkbox, vChkGRUB gMytab Checked
;Gui, Add, Button, gInstall, Install
Gui, Tab
Gui, Show,w640, RescueUSB
Return
Guiclose:
exitapp
Mytab:
Gui, Submit, Nohide
if Mytab = Tools
{
ifExist,%A_scriptdir%\test.txt
{
guicontrolget,chkgrub
if chkgrub = 0
msgbox,NOT checked
else
msgbox,Checked
return
}
else
msgbox,File NOT exist`n%A_scriptdir%\test.txt
return
}
|
|
|
| Back to top |
|
 |
Acris
Joined: 18 Jan 2010 Posts: 193 Location: Switzerland
|
Posted: Mon Mar 22, 2010 9:57 am Post subject: |
|
|
Hi Garry,
Je vais essayer d'expliquer en français, ça sera peut être plus facile..
Dans mon programme, j'ai la checkbox ChkGRUB cochée par défaut.
| Code: | | Gui, Add, Checkbox, vChkGRUB Checked%GRUB%, %INSTALLGRUB% |
Lorsque je cliques sur l'onglet Tools, je veux que cette checkbox soit décochée si le fichier grub est détecté sur la clé usb sinon que la checkbox reste cochée.
--> Gui, Add, Checkbox, vChkGRUB , %INSTALLGRUB%
Est ce possible si oui comment faire ?
merci |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2212 Location: switzerland
|
Posted: Wed Mar 24, 2010 7:53 am Post subject: |
|
|
sorry Acris, ask again , maybe english
(I'm not "available" (time) or also no knowledge .... )
I know, many help (users) here , also in other forums ...
http://de.autohotkey.com/forum/ (german) |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|