Sign in to follow this  
Followers 0
NicoTn

gui help

3 posts in this topic

i need help!! ... i need when i close the gui from the newNote() function , that i can reuse the [New Note] button.. cuz now its not appearing again when i close it and press the button ...

#cs
                        Note Safe 0.1 BETA - BUIlD 0001                      
                      Modified on: Tuesday, May 13, 2008                       
          Created by: NicoTn <nickkamoen[AT]hotmail[DOT]com>
#ce

; # Includes.
#include <GUIconstants.au3>
#include <String.au3>
FileInstall(@ScriptDir&"\logo.bmp","C:\TEMP\logo.bmp",1)
Global $currentVersion = "0.1"

; # File Safe main script

Global $mainGui = GUICreate("Note Safe 0.1 BETA - BUILD 0001",450,195,-1,-1)
GUISetBkColor(0x000000)
$optionsGroup = GUICtrlCreateGroup("Options",313,0,135,193)
GUICtrlSetColor($optionsGroup,0xFFFFFF)
$listView = GUICtrlCreateListView ("Note Name|Date|Added By|Encrypted|Safed",2,6,310,187)

$newNote = GUICtrlCreateButton("New Note!",318,17,125,19)
$openNote = GUICtrlCreateButton("Open/Read Note!",318,36,125,19)
$delNote = GUICtrlCreateButton("Delete Note!",318,55,125,19)
GUICtrlCreatePic(@ScriptDir&"\logo.bmp",320,80,125,111)
loadNotes()

GUISetState()
while 1
   $msg = GUIGetMsg()
   if $msg = $GUI_EVENT_CLOSE then Exit
   if $msg = $newNote Then newNote()
      
WEnd

; # Functions
Func newNote()
   $newNote = GUICreate("New Note - Note-Safe 0.1",100,100,-1,-1)
   GUISetState()
   While 1
      $newNoteMSG = GUIGetMsg()
      if $newNoteMSG = $GUI_EVENT_CLOSE then
         GUIDelete($newNote)
         GUISwitch("Note Safe 0.1 BETA - BUILD 0001")
         ExitLoop
      EndIf
   WEnd
EndFunc

Func loadNotes()                                                            
$iniPath = "notes.ini"                                                       
for $i = 0 to IniRead($iniPath,"main","notes"," ")
   if FileExists("notes.ini") Then
      $name   = IniRead($iniPath,"note"&$i,"name","")
      $date   = IniRead($iniPath,"note"&$i,"date"," ")
      $by        = IniRead($iniPath,"note"&$i,"by"," ")
      $encrypted = IniRead($iniPath,"note"&$i,"encrypted"," ")
      $safed     = IniRead($iniPath,"note"&$i,"safed"," ")
;~     MsgBox(0,$name,$date&" "&$by&" "&$encrypted&" "&$safed)
      GUICtrlCreateListViewItem($name&"|"&$date&"|"&$by&"|"&$encrypted&"|"&$safed,$listView)
   EndIf
Next
TrayTip("Note-Safe "&$currentVersion,"Note-Safe loaded "&$i&" notes.",0,1)
EndFunc

Func crypt($t,$pw,$type)
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;                        ;;
  ;;  I have not made this script!;;
  ;;   This script is made by:  ;;
  ;;          Jaenster          ;;
  ;;                              ;;
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   
  ;~ $text = "1111"
  ;~ $password = "1234"
  ;~ $Cryped = Crypt($text,$password,0)
  ;~ consolewrite($Cryped&@crlf)
  ;~ $Decrypt= crypt($Cryped,$password,1)
  ;~ consolewrite($Decrypt&@crlf)
   
   if $type = 1 then $t = _HexToString($t)
   $Terug = ""
   $pwlen=stringlen($pw)
   $textlen = stringlen($t)
   dim $text[$textlen+1]
   for $z = 1 to $pwlen
      for $i = 1 to $textlen
         $text[$i] = hex(bitxor(asc(stringmid($t,$i,1)),asc(stringmid($pw,$z,1))),2)
      next
   next
   for $i = 1 to ubound($text)-1
      if $type =1 then $terug &= chr(dec($text[$i]))
      if $type <> 1 then   $terug &= $text[$i]
   next
   return $Terug
Endfunc

while 1
     If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe")
wend
[size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size]

Share this post


Link to post
Share on other sites



You used $NewNote as a control in the main GUI then as the name of the second GUI.

... thats a Bozo nono!!!

this works

Func newNote()
   $newNoteGUI = GUICreate("New Note - Note-Safe 0.1",100,100,-1,-1)
   GUISetState()
   While 1
      $newNoteMSG = GUIGetMsg()
      if $newNoteMSG = $GUI_EVENT_CLOSE then
         GUIDelete($newNoteGUI)
         GUISwitch("Note Safe 0.1 BETA - BUILD 0001")
         ExitLoop
      EndIf
   WEnd
EndFunc

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

thnx alot :) my and my stupid head :(


while 1
     If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe")
wend
[size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0