Jump to content

JustSomeone

Active Members
  • Posts

    86
  • Joined

  • Last visited

Community Answers

  1. JustSomeone's post in Hamachi was marked as the answer   
    This works like a charm, hoever if the hamachi is in power on state, it powers it off.
    I will try to rewrite it so it  can read the tray and if it says "Hamachi -- ready" instead of "Hamachi -- offline" not to send the controlclick 
  2. JustSomeone's post in Dumb question #1 was marked as the answer   
    I don't understand the trim part, where i get the name, convert it to string, change it then rename the file. can i get an example of the renaming part please ?
    EDIT 
    i made it
    ConsoleWrite(" Source filename : " & $zFileName &@CRLF) Local $sFileNoext = StringTrimRight($zFileName,4) ;remove the file extension and keep the rest of the name Local $sFilePattern = StringTrimRight($zFileName,14) ; remove the file extension and the _page_000x pattern Local $sNameLen = StringLen($sFileNoext) ; calculate the lenght of the string Local $sNameLen1 = $sNameLen - 1 ; reduce count with 1 local $sName0or1 = StringTrimLeft($sFileNoext,$sNameLen1);get the page number by its name ConsoleWrite("Destination name : " & $sName0or1 & $sFilePattern & ".tif" &@CRLF)
  3. JustSomeone's post in Format SD-Card when inserted was marked as the answer   
    There is an example, please read it before using it
    #include <MsgBoxConstants.au3> #include <File.au3> HotKeySet("{ESC}", "Terminate") ; Hotkey to exit the program HotKeySet("{F4}", "aTestFile") ; hotkey to check for the SD card, try to write file and then format it Global $sDrive = "F:" ; insert the card's letter here Global $eFormat = 0 ; set this to 1 to enable formating, made like this so i will be sure noone will accidently format his drives because he didnt read While 1 Sleep(100) WEnd Func Terminate() Exit EndFunc Func aTestFile() Local $i Local $ready = "READY" For $i = 1 to 60 sleep(1000) Local $sStatus = DriveStatus($sDrive) If $sStatus = $ready Then _FileCreate($sDrive & "\test.tmp") If @error Then MsgBox($MB_SYSTEMMODAL, "Error", " Error creating temp file",5) ExitLoop EndIf FileDelete($sDrive & "\test.tmp") If @error Then MsgBox($MB_SYSTEMMODAL, "Error", " Error deleting temp file",5) ExitLoop EndIf sleep(5) If $eFormat = 1 Then RunWait(@ComSpec & " /C format " & $sDrive & " /Q /y") ;ProcessClose("cmd.exe") ProcessWaitClose("cmd.exe") MsgBox($MB_SYSTEMMODAL, "Success","Format completed, please change the card and press the hotkey again", 5) Else MsgBox($MB_SYSTEMMODAL, "Error", "Format C: /Q /y is the way of the hero",5) ; yea EndIf ExitLoop ElseIf $i < 30 And $sStatus <> $ready Then ConsoleWrite($i & @CRLF) ConsoleWrite("Status of the drive : " & $sStatus & @CRLF) ElseIf $i = 30 OR $i > 30 And $sStatus <> $ready Then MsgBox($MB_SYSTEMMODAL, "Error", " Drive was not become ready within 30 seconds,card might be broken",5) ExitLoop EndIf Next EndFunc
  4. JustSomeone's post in FTP problems was marked as the answer   
    Something i deleted here I'm complete retard, i had it wrong way
    If @error Then ConsoleWrite("FTP Open error : " & @error & @CRLF) Local $Conn = _FTP_Connect($connection, $server, $username, $pass) If @error Then ConsoleWrite("FTP Connect error : " & @error & @CRLF) If $Conn = 0 Then MsgBox(0, "Error", "No internet connection, please try again") Exit Else _FTP_DirSetCurrent($connection, $hdir) this should use $Conn instead of $connection
    If @error Then ConsoleWrite("FTP Open error : " & @error & @CRLF) Local $Conn = _FTP_Connect($connection, $server, $username, $pass) If @error Then ConsoleWrite("FTP Connect error : " & @error & @CRLF) If $Conn = 0 Then MsgBox(0, "Error", "No internet connection, please try again") Exit Else _FTP_DirSetCurrent($Conn, $hdir) script continue here -------------^ here is the problem
  5. JustSomeone's post in Cancel an Exit Event was marked as the answer   
    Change this
    While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch If $CaptureStatus = True Then ReadLogs() EndIf Sleep(10) WEnd  to this
    While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitDaApp() EndSwitch If $CaptureStatus = True Then ReadLogs() EndIf Sleep(10) WEnd and it will be ok, working for me when changed
  6. JustSomeone's post in ALOT of checkboxes was marked as the answer   
    Thanks, i will try this out. 
    Will post feedback if i get stuck somewhere 
    EDIT
    Dear Melba23
    I love you
    :~
    Func x32show() If GUICtrlRead($Checkbox[38]) = 4 Then For $n = UBound($Checkbox) = 1 to 33 step 1 GUICtrlSetState($n, $GUI_UNCHECKED) GUICtrlSetState($n, $GUI_HIDE) Next Elseif GUICtrlRead($Checkbox[38]) = 1 Then For $n = UBound($Checkbox) = 1 to 33 step 1 GUICtrlSetState($n, $GUI_CHECKED) GUICtrlSetState($n, $GUI_SHOW) Next EndIf EndFunc works like a charm 
×
×
  • Create New...