Jump to content

Dimitric

Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Dimitric's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Problem solved, i do a Winwait and miracle it work this time.
  2. Hello to all, The subject was already treated several times but none of these solutions helped me, none works. Made, I want to uncheck buttons which are in the security center of W10, problems is that it looks like the buttons which do not appear to the screen are not unchecked, while their instanceID is the good ID (I verified with AutoitWindows Info), here is the introduction of my problem, to be able to unchecked the buttons I wanted to maximize my window, except that impossible. I have already tried with WinSetState, sends of command SEND with the combination of touch Windows + UP, impossible to maximize.During WinsetState it looks like he does not find my window, for Windows + UP I think that it is the window which does not put itself activates it, but even there ShellExecute( "Control.exe", "wscui.cpl") WinWait("Sécurité et maintenance") Send("+{TAB 7}") Sleep(200) Send("{Enter}") WinSetState("Modifier les paramètres du centre Sécurité et maintenance","", @SW_MAXIMIZE) Sleep(10000) WinWait("Modifier les paramètres du centre Sécurité et maintenance") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:1]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:2]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:3]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:4]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:5]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:6]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:7]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:8]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:9]", "UnCheck", "") ControlClick("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:10]") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:11]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:12]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:13]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:14]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:15]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:16]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:17]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:18]", "UnCheck", "") ControlCommand("Modifier les paramètres du centre Sécurité et maintenance", "Modifier les paramètres du centre Sécurité et maintenance", "[CLASS:Button; INSTANCE:19]", "UnCheck", "") Sleep(1000000) WinWait("Modifier les paramètres du centre Sécurité et maintenance") WinClose("Modifier les paramètres du centre Sécurité et maintenance") Sleep(100) ProgressSet("20%", "Désactivation des messages du centre de maintenance terminée...") Sleep(100) PS: if I make a WINWAIT (" Modifier les paramètres du centre Sécurité et maintenance"), before making the WINSETSTATE autoit seems to detect well my window because it executes the rest of the scripts. Thank you for your help.
  3. Will try, thank you. edit : It work perfectly, thank you my friend !
  4. Hello everyone, i have a problem on my scripts to activate the auto install of driver on W10 with autoit. When i open "control.exe", "sysdm.cpl" and i send "Send("^{TAB}")" my PC is doing nothing, like windows 10 don't take Control + Tab, but when i do with my keyboard it works, so i think there is something with the script with W10 ? Here it is the scripts i have : ProgressSet("3%", "Activation recherche auto pilote sur le net en cours...") Sleep(200) ShellExecute("control.exe", "sysdm.cpl") WinWait("Propriétés système") ;==> Attend la fenêtre msgbox(1,"test","1") Send("^{TAB}") msgbox(1,"test","2") Sleep(100) ControlClick("Propriétés système", "", "[ID:2008]") ;==> Envoi un clic msgbox(1,"test","3") Sleep(300) ControlClick("Paramètres d’installation de périphérique", "", "[ID:1082]") Sleep(100) ControlClick("Paramètres d’installation de périphérique", "", "[ID:1]") Sleep(300) ControlClick("Propriétés système", "", "[ID:1]") ProgressSet("5%", "Activation recherche auto pilote sur le net terminée...") Sleep(10000) All the french in the scripts are just the name of window opened. Thanks for the help.
  5. Yes, it's clear now, thank you !
  6. Yes that's it, so i'm going to use your solution at the end Your solution seems working, it search my character in logfile right ?
  7. Well i just spoke with my boss, and he tell me the solution of jchd will work, for a time. he tell me if we change the timestamp or if we add something on the logfile (like the PC name if we put the logfile on the server) it will not work properly (i need to do a code that can be improve without change anything), so i need to do a caracter search in my logfile, like your solution @Melba23 right ?
  8. I used it and adapted to my scripts, it work perfectly ! Thank you my friend ! @Melba23 i used what you give me, it work too (pretty nice i have to say), and i thank you again, but the solution of jchd is shortly so i will use it. Thank you to both to help me.
  9. Wow i tried it it work pretty nice ! But how can i put the extracted data in a variable ? edit : forget about it, it go in a variable by default.
  10. Great, i'm going to test it thank you. but can i use the data that have been extracted on : ; Extract data from the line $sData = StringRegExpReplace($sLine, "^.*\s:\s(.*)$", "$1")without displayed it ? like i tried to explain at the end of my last message.
  11. Hi, i don't need to know wich line i need to extract because when i want to extract my information i only have 1 line (it's at the beginning of my script) in my logfile. look : While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Continuer _FileWriteLog($LogFile,"Continuer") FileCopy($Ressources & "Auto_install_suite.bat", @StartupDir & "\Auto_install_suite.bat") ;==> Copie le .bat dans startup Shutdown(6) Case $Non _FileWriteLog($LogFile,"Non") MsgBox(0, "Auto-Install -GV-", "Sortie du programme...") exit Case $Oui _FileWriteLog($LogFile,"Oui") ;==> Renomme le pc en utilisant le nom du compte connecté + Groupe de travail _FileWriteLog($LogFile,"Début changement nom pc") $CompName = @UserName RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Computername\Computername", "Computername", "REG_SZ", $CompName) RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputername", "Computername", "REG_SZ", $CompName) RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "Hostname", "REG_SZ", $CompName) RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters", "NV Hostname", "REG_SZ", $CompName) RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "AltDefaultDomainName", "REG_SZ", $CompName) RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "DefaultDomainName", "REG_SZ", $CompName) RegWrite ("HKEY_USERS\.Default\Software\Microsoft\Windows Media\WMSDK\General", "Computername", "REG_SZ", $CompName) ;==> Fin renommage pc + Groupe de travail DllCall("Netapi32.dll", "long", "NetJoinDomain", "int", 0, "wstr", "CVINCENT", "int", 0, "int", 0, "int", 0, "dword", 0x00000040) ;==> Modifie le groupe de travail _FileWriteLog($LogFile,"Fin changement nom pc") $REP_CompName2 = MsgBox(4, "Auto-Install -GV-", "Modification effectuée, OUI pour redémarrer ou NON pour faire autre chose...") If $REP_CompName2 = 6 Then FileCopy($Ressources & "Auto_install_suite.bat", @StartupDir & "\Auto_install_suite.bat") ;==> Copie le .bat dans startup Shutdown(6) Else $REP_CompName3 = MsgBox(4, "Auto-Install -GV-", "Continuer le script au prochain démarrage ?") If $REP_CompName3 = 6 Then Exit Else FileDelete(@StartupDir & "\Auto_install_suite.bat") Exit EndIf EndIf Exit EndSwitch WEndthat's in french so sorry about it, that's in my pre-script if i can call him like that, if you like just after the case $continuer you can see the _FileWriteLog($LogFile,"Continuer")that write in my logfile my information so there is only this for now. (But if i write something more in my logfile it will be in line 2, the info i need is still line 1). After when i go on my second scripts (auto_install_suite.au3) i want to extract only the Yes/No/Continue from the logfile and that what i don't know how to do it, i know how to extract an entire line, but not only Yes/no/continue.
  12. Hello everyone, i got a problem when i want to extract a caracter string from my logfile. in my scripts i use $logfile and when the users enter all the choice to install some program or configure the PC the script write in the logfile what he did. on my first test it write if the user say Yes, No or Continue and it write in the logfile this : 2015-09-22 09:01:45 : Yes (it's in french hours and date) so i want to know how i can just take the Yes, no or Continue from my logfile. I just checked in the help of scite and i only found -filereadline but it don't work for it. I got an other question it's after extract my character, i want to know if i can use the extraction directly after or i need to put the extraction in a variable. like if i do this test : If _filereadline = "Yes" then Case1 ... i know the test is wrong, but in my idea it work like this. thanks you for your help, and sorry for my bad english, i really need to improve it. Best regards.
×
×
  • Create New...