Jump to content

EricF

Active Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by EricF

  1. Hi Just little question for curiosity: is it possible to add a button at the right of the titlebar to reduce the window to the systray as this image.
  2. Hi, I developped a small soft with a Combo Text. If i launch it with a specific parameter, the combo text is read only, and can be reactivated with a button. All is okay..... except that the carriage return don't function in the Combo text after reactivation. Here is the concerned parts of the code : If StringInStr($CmdLineRaw, "/readonly") Then $style_Combo = BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL,$ES_READONLY) ;Styles du Combo text en Lecture seule Else $style_Combo = BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN,$WS_VSCROLL) ;Styles du Combo text en mode normal EndIf $Edit1 = GUICtrlCreateEdit($contenu_fichier, 15, 30, 420, $hauteur_edit, $style_Combo) ;Actions While 1 $msg = GuiGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $btn_close btn_close() Case $btn_erase btn_erase() Case $btn_save btn_save() Case $btn_CreateLnk btn_CreateShortcut() Case $btn_ModifActiv btn_ModifActiv() EndSwitch Wend Func btn_ModifActiv() GUICtrlSetState($btn_save, $GUI_ENABLE) GUICtrlSetStyle($Edit1, $GUI_ENABLE) GUICtrlSetState($btn_ModifActiv, $GUI_DISABLE) GUICtrlSetData($btn_ModifActiv, "Mode Modif. activé") MsgBox(64, "Activation de la modification", "Modification activée", 1) EndFunc I tried with GUICtrlSetState($Edit1, $GUI_DISABLE) instead of the style $ES_READONLY, the problem is the same. AutoIt 3.3.8.1
  3. I modified my scripts. It returns an error 3 when I try to launch a program using a network drive. If I launch the same with an UNC path, it's okazy. Do u know a problem in autoit with the network drives ? The network is available, and a FileExists() on it return true.
  4. lol I used the 3 first, and the result is the same.
  5. Hi, I'm testing the RunAs() function. I created 2 scripts for that. Launcher.exe : Dim $param = $CmdLine[1]; Dim $user = IniRead("_launcher.ini", "general", "user", 0) Dim $pass = IniRead("_launcher.ini", "general", "pass", 0) Dim $domain = IniRead("_launcher.ini", "general", "domain", 0) Dim $flag = IniRead("_launcher.ini", "general", "flag", 0) Dim $runas MsgBox(0, "test", "user : " & $user & " /domaine : " & $domain & " /pass : " & $pass & " /flag : " & $flag & " /param : " & $param) $runas = RunAs($user, $domain, $pass, $flag, $param) Test.exe : MsgBox(0, "", "Username : " & @UserName & " - DNSDomain : " & @LogonDNSDomain & " - Domain : " & @LogonDomain) If i launch test.exe, it shows the current loggin informations. If i launch "c:pathlauncher.exe c:pathTest.exe" with a network user, I have first a msgbox from launcher.exe that show the correct informations, but not the msgbox from Test.exe. I tried lots of possibilities, even changing the flag number, but the problem is always here. If I try the same scripts on my computer with local admin account, it's ok. WTF ? What flag number to use ?
  6. Because it is a system alias ? And that the path is specified in the system alias informations ?
  7. Hi, I try to launch an app using a specific remote account. I tried on my PC with the local admin account, and it doesn't works. The progrm isn't launched. RunAs("administrateur", @ComputerName, "****", 0, "wordpad.exe") I have the same problem with the desired remote account. WTF ??
  8. Is it not possible to use the class provided by AutOit Window Info (ATH_Note for messages) ?
  9. Hello, Before a save, I would like to verify if Oulook Express has a message that is opened to prevent datas loss. Is it possible ?
  10. The file informations aren't changed after compilation. The ouput is simply
  11. It doesn't function for me.
  12. Hello, How to define a program version and the informations shown in the file properties, version tab ?
  13. Problem resolved ! I have used _FileListToArray() and _ArrayMax() to have the number of files in the directory. Then, I have initialized a counter, incremented after each file move. Then, I verify that the counter is equal to the _ArrayMax() value. ;On cherche le premier fichier SQL $liste_fichiers = FileFindFirstFile($dossier_temp_sql & "*.sql") #include <File.au3> #include <Array.au3> ;On regroupe la liste des fichiers du dossier dans un Array $liste_fichiers_array = _FileListToArray($dossier_temp_sql, "*.sql", 1) ;On récupère la valeur maximale dans l'Array (= nb de fichiers du dossier) $liste_fichiers_array_total = _ArrayMax($liste_fichiers_array, 0) ;MsgBox(0, "index max", $liste_fichiers_array_total);pour test Array ;Si aucun n'est présent dans le dossier, on affiche un message If $liste_fichiers = -1 Then SoundPlay("H:\WINDOWS\Media\chord.wav") MsgBox(0, "Error", "Erreur : aucun fichier dans le dossier " & $dossier_temp_sql & " !") Exit EndIf $nb_fichiers = 0;Initialisation du compteur de fichiers ;Si la fonction FileFindFirstFile renvoie 1 (true), on cherche le fichier suivant et on boucle pour le déplacement des fichiers dans un nouveau dossier While 1 $nom_fichier = FileFindNextFile($liste_fichiers) If @error Then ExitLoop If $date_split[1] = 05 Then;On vérifie si la date du jour est 01 ;On vérifie que la date de modification des fichiers SQL est identique à la date du jour (en cas de non transfert des fichiers SQL) If StringMid(FileGetTime($dossier_temp_sql & $nom_fichier, 0, 1), 1, 8) = $date_split[3] & $date_split[2] & $date_split[1] Then ;MsgBox(0, "test", "nom : " & $nom_fichier & " - compteur : " & $nb_fichiers & " - La date correspond !");pour test FileMove($dossier_temp_sql & $nom_fichier, $destination, 9);flag 9 : crée la destination si elle n'existe pas et écrase les fichiers existants ;On incrémente le compteur de fichiers $nb_fichiers = $nb_fichiers+1 ;On vérifie que le compteur de fichiers est égal au nombre de fichiers du dossier if $liste_fichiers_array_total = $nb_fichiers Then SoundPlay("H:\WINDOWS\Media\chimes.wav") MsgBox(0, "Copie des sauvegardes SQL", "Déplacement terminé !", 3) EndIf Else SoundPlay("H:\WINDOWS\Media\chord.wav") MsgBox(0, "Copie des sauvegardes SQL", "Erreur : la date des fichiers SQL n'est pas la date du jour ! Le déplacement des fichiers ne se fera pas.") ;MsgBox(0, "test", "nom : " & $nom_fichier & " - La date ne correspond pas : " & StringMid(FileGetTime($dossier_temp_sql & $nom_fichier, 0, 1), 1, 8) & " - " & $date_split[3] & $date_split[2] & $date_split[1] & " !");pour test ExitLoop EndIf EndIf WEnd
  14. Thanks. But the message must appear after the last file move, and only if FileMove is run. Right now, the message always appear.
  15. You only change ;if @error = 1Then It's not the problem because 1. I already try it, 2. this line is commented, and doesn't affect the code. The line MsgBox(0, "fin", @error) return a 0 value for @error after each file. I already have tested with true.
  16. The problem is that It don't works with the result of @error. While 1 $nom_fichier = FileFindNextFile($liste_fichiers) If @error Then ExitLoop If $date_split[1] = 01 Then;On vérifie si la date du jour est 01 ;On vérifie que la date de modification des fichiers SQL est identique à la date du jour (en cas de non transfert des fichiers SQL) If StringMid(FileGetTime($dossier_temp_sql & $nom_fichier, 0, 1), 1, 8) = $date_split[3] & $date_split[2] & $date_split[1] Then MsgBox(0, "test", "nom : " & $nom_fichier & " - La date correspond !") ;FileMove($dossier_temp_sql & $nom_fichier, $destination, 9);flag 9 : crée la destination si elle n'existe pas et écrase les fichiers existants ;if @error Then MsgBox(0, "fin", @error) <------ problem here ;EndIf I would like to show a message after the last move.
  17. Hello, I use FileFindNextFile() to move files to another directory. I would like to show a message after the last file. @error always return 0, even at the end of the loop. How to proceed ? I use AutoIt 3.2.10 on Win XP.
  18. Yes, but it's not logic because this editor is designed to be used with .au3 files. If I use this function, it's in a .au3 file.
  19. When you use F1, it's to open AutoIt help file, not to open MS Word Help file !
  20. Hello, I would like to use the yymmdd date format, but it seems that it's not possible to specify a specific date format. How to do this (uses 2 digits for the year) ? The short date format on my PC is dd/mm/yyyy and I don't want to change it.
  21. Hello, In SciTE4AutoIt3 Version 1.71, when you press F1, the help don't opens if the file is not saved.
  22. I have already tested this script, it don't works !
  23. Is anyone has already used a FTP connection with AutoIt ?
  24. I have the same problem with this syntax.
×
×
  • Create New...