AutoHotkey Community

It is currently May 27th, 2012, 3:01 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Tab : uncheck box
PostPosted: March 19th, 2010, 1:01 pm 
Offline

Joined: January 18th, 2010, 9:25 am
Posts: 193
Location: Switzerland
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("")
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 1:29 pm 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 1:46 pm 
Offline

Joined: January 18th, 2010, 9:25 am
Posts: 193
Location: Switzerland
I do not absolutely controlled the presence of the file if it is uncheck the bo


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 2:36 pm 
Offline

Joined: January 18th, 2010, 9:25 am
Posts: 193
Location: Switzerland
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2010, 8:04 pm 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
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
   }


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 22nd, 2010, 10:57 am 
Offline

Joined: January 18th, 2010, 9:25 am
Posts: 193
Location: Switzerland
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2010, 8:53 am 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2249
Location: switzerland
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)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], rbrtryn and 29 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group