987learner
Active Members-
Posts
29 -
Joined
-
Last visited
987learner's Achievements
Seeker (1/7)
0
Reputation
-
Try activating it manually and monitor where it stores the lic file or search around the harddisk. Could be in registry, userprofile folder and maybe in .ini format or other file type.
-
Hi rizal Simple work around is to create another script with just MsgBox(0, "Result", "Pass") and complied it. Run it but don't click ok so as to keep it there. Then you can get on with your main script.
-
compare 2 value from different files
987learner replied to rizal's topic in AutoIt General Help and Support
Sorry for the late reply as I was out for 8 hrs after I post it. I retest again, no problem here. Can appear as intended. Don't really know why it is not working at your end. Nevertheless, GEOSoft has provided you a sample, but for learning sake, have you benefit from his script? Do bear in mind we assumed in good faith your file1.txt & file2.txt will always contain integer value only. (I believe you extact the value thru some other script/batch file) The problem is: if file1.txt has a value of 5w8780 then output could evaluate wrongly. -
compare 2 value from different files
987learner replied to rizal's topic in AutoIt General Help and Support
Hi Rizal I'm a newbie here too. Some simple code to get you going. No extensive error checking code here. $sFile1="file1.txt" $sFile2="file2.txt" $hfile1=FileOpen ( $sFile1, 0 ) If $sFile1 = -1 Then MsgBox(0, "Error", "Unable to open "&$sFile1&" file") Exit EndIf $ivalue1a=Fileread ($hfile1);file 1 handle FileClose($sFile1) msgbox (0,"File1",$ivalue1a) ;test point, remove this line after tested ok $hfile2=FileOpen ( $sFile2, 0 ) If $sFile2 = -1 Then MsgBox(0, "Error", "Unable to open "&$sFile2&" file") Exit EndIf $ivalue2a=Fileread ($hfile2) FileClose($sFile2) msgbox (0,"File1",$ivalue2a) ;test point If $ivalue1a > $ivalue2a then msgbox (0,"Output",$sFile1 & " has larger integer"&@crlf& _ $sFile1 & " has "& $ivalue1a&@crlf& _ $sFile2 & " has "& $ivalue2a) -
Avira Antivir addon for nLite script
987learner replied to Orao's topic in AutoIt General Help and Support
You can give this page a try http://www.msfn.org/board/topic/141102-avira-setup-creator-for-avira-antivir-personal-v9v10/ Otheriwse, try running your script via RunOnceEx and test in VM first Can also add to beginning of your script, a way to exit your script if hang HotKeySet("^!x", "MyExit"); ctrl + alt + x to exit if script hang ; your script goes here Func MyExit() Exit EndFunc Personally, I would rather use winwait rather than waitwaitactive because script will hang easily if window are not active especially during unattended setup situation. -
If controlclick doesn't work, try mouseclick (maybe with WinGetPos)
-
U can use the ccleaner's program GUI to save all settings to an ini file. (I think it's ccleaner.ini, within the default C:\program files\ccleaner folder) Then run with ccleaner.exe /Auto
-
-1 should be documented in the help file, really. So many meaning yet no info in help file
-
Thnaks for the help,comment and pointers. I'm new to GUI coding...
-
Trying very hard to find what's wrong with my code but I gave up. Can anyone help to see where is the error? Both GUI Button when clicked is not working at all #Include <Misc.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> Opt("WinTitleMatchMode", 2) Opt("TrayIconDebug", 1) _Singleton(@ScriptName, 0) $Parent1= GUICreate("Shutdown", 190, 100,@DesktopWidth/2,@DesktopHeight/2,-1,$WS_EX_TOPMOST) GUICtrlCreateLabel("Auto forced Shutdown in ",10, 10) GUICtrlCreateLabel("sec",155, 10) $Now=GUICtrlCreateButton("Now",20,40,50,25) $Abort=GUICtrlCreateButton("Abort",100,40,50,25) GUISetState(@SW_SHOW) For $i=5 to 0 Step -1 While 1 $msg = GUIGetMsg() GUICtrlCreateLabel($i,135, 10) Select Case $msg =$Now msgbox (0,"Now","Now pressed") Case $msg =$Abort msgbox (0,"Abort","Abort pressed") exit Case $msg =$GUI_EVENT_CLOSE exit EndSelect sleep (1000) Exitloop WEnd Next
-
Trying to install notepad++
987learner replied to shankhs's topic in AutoIt General Help and Support
U can try to create a short delay before send "enter" key ;Installation of npp Run("npp.5.6.4.Installer.exe") WinWaitActive("Open File - Security Warning","&Run") Winwait ("Installer Language","select a language") Winactivate ("Installer Language","select a language") WinWaitActive("Installer Language","select a language") sleep (400); can set longer or shorter Send("{ENTER}") or you can also install silently using it's switch Runwait ("npp.5.6.4.Installer.exe /S") -
How to simulate "enter' in GUICreateInput ?
987learner replied to 987learner's topic in AutoIt General Help and Support
Thanks AndyG, works great with just 1 line of code. Mison, thanks for the reply too. I will study your method to increase my programming option. Thanks again -
http://http://img163.imageshack.us/img163/7282/guiedit.png I'm new to GUI and trying to create a simple GUI for calculation purpose. I would like to know how to simulate "calc now' when keyboard "enter" is hit at the GUICreateInput field as shown by the pic shown above. #include <GUIConstantsEx.au3> Opt("TrayIconDebug", 1) Opt('MustDeclareVars', 1) DIM $CurrentTHK, $CurrentDT, $msg, $Warn, $NewDT, $thkDIFF, $comp DIM $Parent1, $Exit1, $calnow, $exceed $Parent1= GUICreate("Compensator calculator", 290, 190) GUICtrlCreateLabel("Enter Current thk:",10, 10) GUICtrlCreateLabel("E.g. 529 (470 to 530) ",150, 10) GUICtrlCreateInput ("5",100,7,40,20); thk input GUICtrlCreateLabel("Enter Current DT:",10, 45) GUICtrlCreateLabel("Spec (11.5 to 14.5s)",150, 45) GUICtrlCreateInput ("1",100,40,40,20); DT input GUICtrlCreateLabel("Compensated DT:",10, 85) $calnow=GUICtrlCreateButton("Calc now", 70, 150, 60); ctrl id=10 $Exit1 = GUICtrlCreateButton("Exit", 150, 150, 60); ctrl id=11 GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $calnow $CurrentTHK=GUICtrlRead (5); input field for thk $CurrentDT=GUICtrlRead (8); input field for deptime $NewDT=500/$CurrentTHK*($CurrentDT+2)-2 $NewDT=Round ( $NewDT, 1 ) $thkDIFF=Abs ( $CurrentDT-$NewDT ) $comp=Round ( $thkDIFF*0.75,1) If $CurrentTHK>500 then $NewDT=$CurrentDT-$comp If $NewDT<11.50 then GUICtrlCreateLabel($NewDT,100,85) GUICtrlSetColor(-1, 0xff0000);red font for new DT $exceed="Note: New DT is lower than the minimal,"&@crlf&"out of range!" $Warn=GUICtrlCreateLabel($exceed,80,105); 12 GUICtrlSetColor(-1, 0xFF00FF) ;pink warning font GUICtrlCreateLabel("",140,85,140,15); clear clipboard message ClipPut ("") EndIf If $NewDT>11.50 and $NewDT<14.50 then GUICtrlCreateLabel($NewDT,100,85) GUICtrlSetColor(-1, 0x0000FF) ; Blue font GUICtrlCreateLabel ("",80,105,140,15); clear clipboard copied message GUICtrlCreateLabel("(New DT copied to clipboard)",135,85) ;; clear warning message GUICtrlCreateLabel ("",80,105,200,30); clear pink warning message ClipPut ($NewDT) EndIf Else $NewDT=$CurrentDT+$comp If $NewDT>14.50 then GUICtrlCreateLabel($NewDT,100,85) GUICtrlSetColor(-1, 0xff0000); red font for new DT $exceed="Note: New DT is higher than the maximum,"&@crlf&"out of range!" GUICtrlCreateLabel($exceed,80,105) GUICtrlSetColor(-1, 0xff0000) ; Red warning font GUICtrlCreateLabel("",135,85,140,15); clear clipboard copied message ClipPut ("") EndIf If $NewDT>11.50 and $NewDT<14.50 then GUICtrlCreateLabel($NewDT,100,85) GUICtrlSetColor(-1, 0x0000FF); Blue font GUICtrlCreateLabel ("",80,105,200,40); clear clipboard copied message GUICtrlCreateLabel("(New DT copied to clipboard)",135,85) ClipPut ($NewDT) EndIf EndIf Case $msg = $Exit1 exitloop Case $msg = $GUI_EVENT_CLOSE MsgBox(0, "GUI Event", "You clicked CLOSE! Exiting...",4) ExitLoop EndSelect WEnd
-
newbie help on automating installs
987learner replied to mmancini's topic in AutoIt General Help and Support
Alternatively, can be installed silently Runwait ("mbam-setup.exe /sp- /verysilent /norestart")