
Tekkion
Active Members-
Posts
20 -
Joined
-
Last visited
Everything posted by Tekkion
-
Controlsend character switching problem
Tekkion replied to Tekkion's topic in AutoIt General Help and Support
ill try this thx -
Controlsend character switching problem
Tekkion replied to Tekkion's topic in AutoIt General Help and Support
also the strange thing is im trying this script on 4 different vms and this problem is only occuring on my win7 32bit machine :/ -
Controlsend character switching problem
Tekkion replied to Tekkion's topic in AutoIt General Help and Support
Its working well but I don't think that thats the problem, cause the path is correctly passed to the autoit file I checked it even before I use the controlsend command and it shows me the correct path. So I think thats some kind of bug that the ALT key is still pressed from the send before and so its negating the backslashes im trying to send. The question is now is there anyway to control if the ALT key is still pressed and if so reset him. What I will try now is to send a the path to a "dummy control" to negate this ALT key. edit: didnt help -
Controlsend character switching problem
Tekkion replied to Tekkion's topic in AutoIt General Help and Support
still having the problem.... problem occuring in line 62. here's my new code: #RequireAdmin sleep(2000) global $return=4 $aWins=WinList("Avira") For $i = 1 To $aWins[0][0] Switch $aWins[$i][0] case "Avira Professional Security" license_A_Prof_Sec($aWins[$i][1]) Case "Avira Free Antivirus" license_A_Free_AV($aWins[$i][1]) EndSwitch Next func license_A_Free_AV($handle) WinActivate($handle) sleep(3000) Send("!H") Send("m") $whnd=winwait("Avira Free Antivirus","Lizenz",60) ControlClick($whnd,"","[CLASS:Static; INSTANCE:4]") $whnd=winwait("Öffnen","",60) $path = StringReplace($CMDLine[1],"ß","\") sleep(3000) ControlSend($whnd,"","[CLASS:Edit; INSTANCE:1]",$path) sleep(3000) $whnd=winwait("Öffnen","",60) ControlClick($whnd,"","[CLASS:Button; INSTANCE:1]") sleep(500) ControlClick($whnd,"","[CLASS:Button; INSTANCE:2]") $whnd=WinWait("Avira Free Antivirus","Lizenz ist bereits vorhanden",60) ControlClick($whnd,"","[CLASS:Button; INSTANCE:1]") $whnd=WinWait("Avira Free Antivirus","wird nicht installiert",60) if $whnd=0 then $whnd=WinWait("Avira Free Antivirus","Die Lizenzdatei wurde aktualisiert",60) if $whnd <> 0 Then $return=0 endif ControlClick($whnd,"","[CLASS:Button; INSTANCE:1]") $whnd=WinWait("Avira Free Antivirus","Lizenzinformationen",60) sleep(500) ControlClick($whnd,"","[CLASS:Button; INSTANCE:8]") winclose("Avira Free Antivirus") Else $return=3 endif EndFunc func license_A_Prof_Sec($handle) WinActivate($handle) sleep(3000) Send("!H") Send("l") $whnd=winwait("Öffnen","",60) $path = StringReplace($CMDLine[1],"ß","\") sleep(3000) ControlSend($whnd,"","[CLASS:Edit; INSTANCE:1]",$path) sleep(3000) $whnd=winwait("Öffnen","",60) ControlClick($whnd,"","[CLASS:Button; INSTANCE:1]") sleep(500) ControlClick($whnd,"","[CLASS:Button; INSTANCE:2]") $whnd=WinWait("Avira Professional Security","wird nicht kopiert",60) if $whnd=0 then $whnd=WinWait("Avira Professional Security","Die Lizenzdatei wurde aktualisiert",60) if $whnd <> 0 Then $return=0 endif ControlClick($whnd,"","[CLASS:Button; INSTANCE:1]") winclose("Avira Professional Security") Else $return=3 EndIf EndFunc exit($return) -
Controlsend character switching problem
Tekkion replied to Tekkion's topic in AutoIt General Help and Support
I think this is connected to the send im using before. After I put a sleep right before the send with the path string it seems to be working. -
Hi there, the title says it all. My problem here is: im starting the autoit compiled .exes from a cmd window. So im also passing needed parameters there. These parameters are in this case paths to files, and sometimes some slashes within these paths got switched with the german "ß" character which lies on the same key as the backslash. After checking the cmd window the .exe call with the parameter includes the correct path. For some odd reason its only happening sometimes and also only in the license_A_Prof_Sec function. So any hints what could cause this problem? Here is my code: #RequireAdmin run("C:\Program Files (x86)\Avira\AntiVir Desktop\avcenter.exe") sleep(2000) $aWins=WinList("Avira") For $i = 1 To $aWins[0][0] Switch $aWins[$i][0] case "Avira Professional Security" license_A_Prof_Sec($aWins[$i][1]) Case "Avira Free Antivirus" license_A_Free_AV($aWins[$i][1]) EndSwitch Next func license_A_Free_AV($handle) WinActivate($handle) sleep(3000) Send("!H") Send("m") $whnd=winwait("Avira Free Antivirus","Lizenz",60) ControlClick($whnd,"","[CLASS:Static; INSTANCE:4]") $whnd=winwait("Öffnen") ControlSend($whnd,"","[CLASS:Edit; INSTANCE:1]",$CMDLine[1]) ControlClick($whnd,"","[CLASS:Button; INSTANCE:1]") $whnd=WinWait("Avira Free Antivirus","Lizenz ist bereits vorhanden",60) ControlClick($whnd,"","[CLASS:Button; INSTANCE:1]") $whnd=WinWait("Avira Free Antivirus","Die Lizenzdatei wurde aktualisiert",60) ControlClick($whnd,"","[CLASS:Button; INSTANCE:1]") $whnd=WinWait("Avira Free Antivirus","Lizenzinformationen",60) sleep(500) ControlClick($whnd,"","[CLASS:Button; INSTANCE:8]") winclose("Avira Free Antivirus") EndFunc func license_A_Prof_Sec($handle) WinActivate($handle) sleep(3000) Send("!H") Send("l") $whnd=winwait("Öffnen","",60) ControlSend($whnd,"","[CLASS:Edit; INSTANCE:1]",$CMDLine[1]) ControlClick($whnd,"","[CLASS:Button; INSTANCE:1]") $whnd=WinWait("Avira Professional Security","Die Lizenzdatei wurde aktualisiert",60) ControlClick($whnd,"","[CLASS:Button; INSTANCE:1]") winclose("Avira Professional Security") EndFunc
-
Problem comparing global variable
Tekkion replied to Tekkion's topic in AutoIt General Help and Support
after my bath it seems my brain is working again... I've put the function call above the variable declarations.... anyway Its somekind of weird that the script just quits with no error message... thanks anyway regards Tekkion -
Problem comparing global variable
Tekkion replied to Tekkion's topic in AutoIt General Help and Support
yeah I see i forget to call the funcs but not in my other script sorry for that no -
Problem comparing global variable
Tekkion replied to Tekkion's topic in AutoIt General Help and Support
global $user_created="" global $folder_created="" global $rights_set="" global $share_set="" Local $colUsers, $sTmp="||", $Array[1] = ["user"] $colUsers = ObjGet("WinNT://" & @ComputerName) If IsObj($colUsers) Then $colUsers.Filter = $Array For $objUser In $colUsers $sTmp &= $objUser.Name &"|" Next EndIf GUIDelete($wait) MainWindow() func MainWindow() Dim $avarray Local $hGUI = GUICreate("DKS Freigabe einrichten",300,300) ............................................................................................ if DirGetSize(GUICtrlRead($DKI_Share_folder)) = -1 Then if DirCreate(GUICtrlRead($DKI_Share_folder))=0 Then $folder_created=False Else $folder_created=True EndIf endif .................................................................................................... EndIf endif ;Caseend EndSwitch WEnd GUIDelete() EndFunc ;Mainwindow() func status_windwo() ...........................................declarations.................................................. while 1 if $folder_created=true Then if FileExists(@TempDir&"\user.txt") Then GUICtrlSetImage($led1,"green.jpg") $led1set=true Else GUICtrlSetImage($led1,"red.jpg") $led1set=true EndIf EndIf $msg = GUIGetMsg() switch $msg case $GUI_EVENT_CLOSE ExitLoop EndSwitch wend EndFunc as i said if im trying to compare the variable with a value the script just quits without it runs as expected. -
Hi there, following problem: global $test="" func testfunc() $test=true endfunc func anotherfunc() if $test=true then do stuff endif endfunc so if my script is trying to compare the $test variable the script just quits without any error. I don't know what im doing wrong. Basically thats what im trying to do the above testcode is working but my realscript isn't I would post the code of the real script but as I have no idea which part is going wrong I didn't wanted to post the whole thing. Any suggestions or help? Regards Tekkion
-
Hey Brewman, it worked indeed thank you very much Now im gonne try to understand why my approach didnt worked. edit: I was wondering that it even worked without setting $restart back to true... then I found the part where you were setting it back to true... anyway it is working now I'm even more confused edit2: try it with setting $restart back to true and deleting _createGUI() from the btsfunc() still working Greets Tekkion
-
Hi folks, what im trying to do is to write to my ini file which stores the buttons for the gui and then restart the whole gui. What is happening now is that the GUI is indeed restarting but then not responding to the events, so its just stuck. Any hints what could be the error here? #include <GUIConstantsEx.au3> #include <File.au3> #include <WindowsConstants.au3> #include <Array.au3> #RequireAdmin Opt('GuiOnEventMode', 1) global $input global $maingui func _createGUI() if FileExists(@ScriptDir&"\regstart.ini") Then local $aConfig=IniReadSection(@ScriptDir&"\regstart.ini","config") local $aButs[1] $maingui=GUICreate('RegLink',200,($aConfig[0][0]+2)*30-15) GUISetOnEvent($GUI_EVENT_CLOSE, 'quit') Dim $aButs[$aConfig[0][0]] For $i = 1 To $aConfig[0][0] $butname=$aConfig[$i][0] $regkey=$aConfig[$i][1] $aButs[$i-1] = GUICtrlCreateButton($butname,10,($i-1)*30+10,180) GUICtrlSetOnEvent(-1, 'btnsfunc') $x = $i next $x+=1 $input=GUICtrlCreateInput("RegKey",10,($x-1)*30+10,145) $go=GUICtrlCreateButton("go",160,($x-1)*30+10,30) GUICtrlSetOnEvent(-1, 'btnsfunc') GUISetState(@SW_SHOW) Else msgbox(0,"Error","No ini File found!") exit EndIf While 1 sleep(100) WEnd EndFunc _createGUI() Func btnsfunc() local $aConfig=IniReadSection(@ScriptDir&"\regstart.ini","config") $buttext=GUICtrlRead(@GUI_CtrlId) if _ArraySearch($aConfig,$buttext,0,0,0,1) <> -1 then $index=_ArraySearch($aConfig,$buttext,0,0,0,1) $regkey=$aConfig[$index][1] RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit", "LastKey", "REG_SZ",$regkey) run("regedit") Else $regkey="Computer\"&GUICtrlRead($input) $newbutname=InputBox("Neuer Knopf!","Bitte Namen für den neuen Knopf angeben!") IniWrite(@ScriptDir&"\regstart.ini","config",$newbutname,$regkey) GUIDelete($maingui) _createGUI() endif EndFunc Func quit() Exit EndFunc
-
Hi there, as you can read above the problem I'm a bit scared that I could send viruses to our customers. Anybody got experiences with this topic? In detail im installing here Kaspersky Endpoint Security 10. Also the weird thing is that its only detecting viruses in my x86 files not the x64 files. I tried to scan one of these files via https://www.virustotal.com and it also gave me 2 detections from 2 scanners which I've never heard before. Interesstingly kaspersky didnt detect a virus or worm in this file via https://www.virustotal.com. Any suggestions how I can be sure to have no viruses in these files? Thanks in advance. Tekkion
-
do findnextfile works over a network?
Tekkion replied to Tekkion's topic in AutoIt General Help and Support
could not find the problem but with the given example it also works over network shares. -
A Filefindnextfile That Parse Subfolders?
Tekkion replied to ezzetabi's topic in AutoIt Example Scripts
I didn't try to understand the above script completly now but am I wrong if I suspect that you need a recursive script to include all subfolders in the search and that this script only read the first subfolders found in the main folder? -
Hi there, quick question above it doesn't seem to work here is this correct? $path = '\\192.168.5.60\skripte\'&$paket&'\Install\' $file = FileFindFirstFile($path&"*.*") If $file = -1 Then MsgBox($MB_SYSTEMMODAL, "", "Error: No files/directories matched the search pattern.") Return False else while 1 $filename = FileFindnextFile($file) if @error then MsgBox(1, "", "Error: No files/directories matched the search pattern.") ExitLoop else $temp = FileGetTime($path&$filename,0,1) $modtime = StringMid($temp,7,2) & "." & StringMid($temp,5,2) &"."& StringLeft($temp,4) &" "& StringMid($temp,9,2) &":"&StringMid($temp,11,2) IniWrite(@scriptdir&"config.ini",$filename,"ModifiedTime",$modtime) endif wend EndIf greets Tekkion
-
Win8 ControlClick sometimes not working
Tekkion replied to Tekkion's topic in AutoIt General Help and Support
thx for all the advices I will test it out today and give a feedback. -
Win8 ControlClick sometimes not working
Tekkion replied to Tekkion's topic in AutoIt General Help and Support
My approach was to try to do the change I need to do during the installation by using Autoit cause I thought it would be solved faster, then using the silent switch and search for the approriate parameter. Next question would be how can I contact a mod? -
Hey there, so I'm using Autoit mainly for automation of installations. Im using it on WinXP Win7 32/64bit and Win8 32bit. I wrote a script which should just do some clicks within a InstallShield Installation. I developed it on WinXP and it also worked without any problems on WinXP and Win7 but when I try it on Win8 it is stopping during Installation. I can see that the script is paused so I assume its the winwaitactive which paused it but it didnt executed the controllclick above. The whole installation is happening during our own installation program which fires some cmds. If I try to start the program without our own program it is working. Any suggestions where I can start to search for the error? Run("setup.exe") sleep(500) if WinWaitActive("Lesehaus - InstallShield Wizard","InstallShield(r) Wizard installiert Lesehaus auf Ihrem") then ControlClick("Lesehaus - InstallShield Wizard","InstallShield(r) Wizard installiert Lesehaus auf Ihrem","[CLASS:Button; Instance:1]") endif local $whnd=WinWaitActive("Lesehaus - InstallShield Wizard","in den folgenden Ordner") ControlClick($whnd,"","[CLASS:Button; Instance:1]") local $whnd=WinWaitActive("Lesehaus - InstallShield Wizard","Sie den Setup-Typ aus, der Ihren Anforderungen") ControlCommand($whnd,"","[CLASS:ListBox; INSTANCE:1]","SetCurrentSelection", 0) sleep(100) ControlClick($whnd,"","[CLASS:Button; Instance:4]") local $hwnd=WinWaitActive("Lesehaus - InstallShield Wizard","Die Installation von Lesehaus") ControlClick($hwnd,"","[CLASS:Button; Instance:4]")