Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/30/2013 in all areas

  1. AZJIO

    RegExp

    RegExp - Test regular expressions (En, Ru) v1.0.2 screenshot RegExp.7z (0.9 MB, exe+sources+Library_RegExp, v0.8 + v1.0.2) The tool is designed to test regular expressions. Allows you to save the template in the library. alternative: >String Regular Expressi0n Tester V2, Szhlopp C:Program FilesAutoIt3ExamplesHelpfileStringRegExpGUI.au3 >RegExp Quick Tester, Lazycat >RegEx tester, Mat
    1 point
  2. Eukalyptus the GDI+ guru ported the Warp Text to Splines to GDI+ (thread on German forum with examples). I had the idea to mix his example 7 with some GDI+ elements to create an old school Amiga style intro. Here how it looks: It is very CPU intensive and running with acceptable speed only on newer CPUs. Download: Text to Bezier Intro.7z (20 downloads previously) Use latest 7-Zip tool to extract archive properly. Source Code can be seen here: http://pastebin.com/U24ACRAr Credits: see scroller. To start the intro in benchmark mode either change line 23 or compile it and start it with one of following parameter: "/b", "/benchmark" or "/bench". Results will be written to Benchmark.txt in script dir. Here some benchmark results: Br, UEZ Change Log: 2013-05-01: some small modifications 2013-05-06: added benchmark mode
    1 point
  3. DucViet, My pleasure as always. M23
    1 point
  4. PB, I commented out the code that is not required for what you are trying to return... Opt("MustDeclareVars", 1) ;#include <compinfo.au3> Global $iCores = 1, $iThreads = 1 GetCPU_INFO() MsgBox(0, "core info", $iCores & " <--- Cores Threads -->" & $iThreads) Exit Func GetCPU_INFO() ;~ Local $hDll_ntdll = DllOpen("ntdll.dll") ;~ Local $hDll_winmm = DllOpen("winmm.dll") Local $colItems, $objWMIService, $objItem, $cI_Compname = '.' ; <------ tell it which computer or "this one" Dim $aProcessorInfo[1][10], $CoreInfo[2] Local $wbemFlagReturnImmediately, $wbemFlagForwardOnly, $i = 1 $objWMIService = ObjGet("winmgmts:\\" & $cI_Compname & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then For $objItem In $colItems $CoreInfo[0] = $i + 1 $CoreInfo[1] = $objItem.NumberOfLogicalProcessors $i += 1 Next ;~ $aProcessorInfo[0][0] = UBound($aProcessorInfo) - 1 ;~ If $aProcessorInfo[0][0] < 1 Then ;~ SetError(1, 1, 0) ;~ EndIf Else SetError(1, 2, 0) EndIf $iCores = $CoreInfo[0] $iThreads = $CoreInfo[1] If $iCores > $iThreads Then $iCores = $iThreads ;~ DllClose($hDll_ntdll) ;~ DllClose($hDll_winmm) Return EndFunc ;==>GetCPU_INFO If you are interested in system type info the sciptomatic tool is excellent. You can download it h kylomas
    1 point
  5. GreenCan

    GUI design concepts.

    Here is the GUI I use as base for my 'About' window, enhanced by a perforated logo that I made a long time ago... #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_Description=Gui with perforated image #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=A. greenCan #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <Date.au3> #include <String.au3> About("Database SQL") Exit #Region Functions #FUNCTION# ============================================================== Func About($sTitle) Local $iWindowWidth = 250, $iWindowHeight = 110, $Msg $sTitle = _StringRepeat(" ", Int( (($iWindowWidth / 5.9) - StringLen($sTitle))/2)) & $sTitle ; center title Local $sVersion = FileGetVersion(@ScriptName), $aVersionDate = FileGetTime ( @ScriptName , 1 ,0 ) Local $About = GuiCreate($sTitle, $iWindowWidth, $iWindowHeight, -1,-1,$WS_CAPTION, $WS_EX_TOPMOST) GuiSetBkColor(0x0000FF) GuiCtrlCreateLabel("Author: A. GreenCan" & @CR & "Ver " & $sVersion & @CR & _DateToMonth($aVersionDate[1], 1 ) & " " & $aVersionDate[0], ($iWindowWidth-120)/2, 10,120,50) GUICtrlSetColor (-1, 0xFFFFFF) GuiCtrlCreateLabel("", 10,55, $iWindowWidth - 20,1) ; white line GuiCtrlSetBkColor(-1, 0xFFFFFF) Local $sOK = GUICtrlCreateButton("OK", 10, $iWindowHeight - 40, 70,22, $BS_DEFPUSHBUTTON ) ; Perforated Image Local $iLeftPos = $iWindowWidth - 145 Local $iTopPos = $iWindowHeight - 20 _GuiImageHole($About, $iLeftPos, $iTopPos, 136, 41) $iBegin = TimerInit() GUISetState() While 1 $Msg = GUIGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE ExitLoop Case $Msg = $sOK ExitLoop Case TimerDiff($iBegin) > 10000 ; close after 10 sec ExitLoop EndSelect WEnd GUIDelete($About) Return EndFunc ;==>About #FUNCTION# ============================================================== #Region Perforated Image #FUNCTION# ============================================================== Func _GuiImageHole($window_handle, $pos_x, $pos_y,$Image_Width ,$Image_Height) Local $aClassList, $aM_Mask, $aMask, $Block_value #Region picture array Local $PictArray[262] = [ _ '3,1,48,1','50,1,137,1','3,2,48,2','50,2,93,2','94,2,137,2','1,3,2,3','4,3,47,3','49,3,92,3','95,3,137,3','1,4,3,4','5,4,25,4','28,4,46,4','48,4,92,4','95,4,137,4','1,5,3,5','5,5,25,5','29,5,45,5','48,5,92,5','95,5,137,5','1,6,4,6', _ '6,6,24,6','30,6,45,6','47,6,92,6','96,6,137,6','1,7,5,7','7,7,9,7','10,7,23,7','30,7,38,7','42,7,44,7','46,7,93,7','96,7,137,7','1,8,6,8','11,8,24,8','29,8,37,8','45,8,66,8','68,8,93,8','96,8,137,8','1,9,6,9','13,9,24,9','30,9,36,9', _ '44,9,66,9','69,9,87,9','91,9,93,9','97,9,137,9','1,10,6,10','13,10,23,10','31,10,37,10','43,10,65,10','71,10,86,10','92,10,93,10','97,10,137,10','1,11,6,11','12,11,22,11','32,11,35,11','42,11,65,11','71,11,86,11','92,11,93,11','97,11,137,11','1,12,6,12','15,12,22,12', _ '32,12,34,12','43,12,50,12','54,12,65,12','70,12,86,12','97,12,137,12','1,13,5,13','18,13,21,13','32,13,33,13','44,13,49,13','55,13,65,13','72,13,86,13','96,13,137,13','1,14,5,14','15,14,16,14','44,14,48,14','55,14,64,14','73,14,86,14','96,14,137,14','1,15,4,15','15,15,20,15', _ '45,15,48,15','54,15,64,15','74,15,85,15','96,15,137,15','1,16,4,16','17,16,19,16','46,16,48,16','55,16,63,16','75,16,84,16','96,16,137,16','1,17,5,17','17,17,18,17','46,17,47,17','56,17,63,17','76,17,84,17','97,17,137,17','1,18,5,18','17,18,18,18','46,18,47,18','56,18,63,18', _ '77,18,84,18','97,18,137,18','1,19,6,19','16,19,18,19','33,19,34,19','57,19,63,19','77,19,84,19','98,19,137,19','1,20,6,20','16,20,17,20','32,20,34,20','58,20,63,20','77,20,84,20','98,20,137,20','1,21,6,21','16,21,17,21','32,21,34,21','58,21,63,21','78,21,83,21','98,21,137,21', _ '1,22,6,22','32,22,34,22','58,22,63,22','78,22,83,22','98,22,137,22','1,23,6,23','57,23,64,23','78,23,82,23','98,23,137,23','1,24,6,24','57,24,65,24','78,24,82,24','98,24,137,24','1,25,6,25','58,25,65,25','77,25,82,25','99,25,137,25','1,26,6,26','58,26,64,26','76,26,83,26', _ '99,26,137,26','1,27,7,27','32,27,33,27','46,27,47,27','58,27,64,27','77,27,83,27','100,27,137,27','1,28,7,28','31,28,33,28','46,28,47,28','58,28,65,28','77,28,83,28','99,28,137,28','2,29,7,29','31,29,33,29','59,29,65,29','78,29,84,29','98,29,137,29','7,30,8,30','16,30,18,30', _ '31,30,33,30','46,30,47,30','59,30,65,30','79,30,84,30','96,30,137,30','8,31,10,31','15,31,18,31','25,31,26,31','31,31,34,31','45,31,47,31','60,31,62,31','79,31,85,31','95,31,137,31','3,32,6,32','8,32,10,32','15,32,21,32','25,32,26,32','33,32,34,32','42,32,48,32','60,32,62,32', _ '78,32,85,32','95,32,137,32','34,33,35,33','39,33,40,33','42,33,49,33','60,33,62,33','76,33,86,33','95,33,120,33','125,33,130,33','135,33,137,33','38,34,39,34','44,34,51,34','76,34,88,34','95,34,122,34','125,34,129,34','131,34,134,34','135,34,137,34','47,35,51,35','55,35,60,35','64,35,65,35', _ '76,35,88,35','95,35,121,35','123,35,124,35','126,35,128,35','130,35,134,35','135,35,137,35','49,36,51,36','56,36,62,36','65,36,66,36','69,36,70,36','76,36,81,36','83,36,88,36','95,36,120,36','122,36,124,36','126,36,127,36','129,36,137,36','56,37,58,37','66,37,70,37','76,37,78,37','84,37,88,37', _ '95,37,120,37','122,37,124,37','126,37,127,37','129,37,131,37','135,37,137,37','67,38,71,38','77,38,79,38','84,38,89,38','95,38,119,38','126,38,127,38','129,38,132,38','134,38,137,38','32,39,33,39','85,39,89,39','95,39,118,39','120,39,124,39','126,39,127,39','129,39,132,39','134,39,137,39','18,40,24,40', _ '26,40,41,40','86,40,89,40','95,40,117,40','121,40,123,40','127,40,128,40','134,40,137,40','14,41,46,41','85,41,89,41','95,41,137,41','9,42,52,42','88,42,89,42','97,42,137,42','7,43,55,43','57,43,59,43','62,43,65,43','67,43,69,43','70,43,73,43','100,43,137,43','6,44,79,44','100,44,137,44', _ '4,45,81,45','100,45,137,45'] #EndRegion picture array ; get the size of the active window Local $size = WinGetClientSize($window_handle) Local $iWindowWidth = $size[0] Local $Window_height = $size[1]+33 ; including the title bar ; First hide the window $aClassList = StringSplit(_WinGetClassListEx($window_handle), @LF) $aM_Mask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', 0, 'long', 0) ; rectangle A - left side $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $pos_x, 'long', $Window_height) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; rectangle B - Top $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $iWindowWidth, 'long', $pos_y) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; rectangle C - Right side $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Image_Width , 'long', 0 , 'long', $iWindowWidth + 30, 'long', $Window_height) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; rectangle D - Bottom $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0 , 'long', $pos_y + $Image_Height, 'long', $iWindowWidth, 'long', $Window_height) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; now unhide all regions as defined in array $PictArray For $i = 0 To (UBound($PictArray) - 1) $Block_value = StringSplit($PictArray[$i],',') $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Block_value[1] - 1 , 'long', $pos_y + $Block_value[2], 'long', $pos_x + $Block_value[3], 'long', $pos_y + $Block_value[4] -1) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) Next DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $window_handle, 'long', $aM_Mask[0], 'int', 1) $PictArray='' ; empty array EndFunc ;==>_GuiImageHole #FUNCTION# ============================================================== Func _WinGetClassListEx($sTitle) Local $sClassList = WinGetClassList($sTitle) Local $aClassList = StringSplit($sClassList, @LF) Local $sRetClassList = '', $sHold_List = '|' Local $aiInHold, $iInHold For $i = 1 To UBound($aClassList) - 1 If $aClassList[$i] = '' Then ContinueLoop If StringRegExp($sHold_List, '\|' & $aClassList[$i] & '~(\d+)\|') Then $aiInHold = StringRegExp($sHold_List, '.*\|' & $aClassList[$i] & '~(\d+)\|.*', 1) $iInHold = Number($aiInHold[UBound($aiInHold)-1]) If $iInHold = 0 Then $iInHold += 1 $aClassList[$i] &= '~' & $iInHold + 1 $sHold_List &= $aClassList[$i] & '|' $sRetClassList &= $aClassList[$i] & @LF Else $aClassList[$i] &= '~1' $sHold_List &= $aClassList[$i] & '|' $sRetClassList &= $aClassList[$i] & @LF EndIf Next Return StringReplace(StringStripWS($sRetClassList, 3), '~', '') EndFunc ;==>_WinGetClassListEx #FUNCTION# ============================================================== #EndRegion Perforated Image #EndRegion Functions
    1 point
  6. Could be useful. I edited the code a bit. The Fade Out function didn't run because the loop values went from low to high with a negative step. Also got the window handle and used WinActivate instead of GuiSetState WinFadeOut("WinFadeIn/WinFadeOut Functions","") Sleep(1000) WinFadeIn("WinFadeIn/WinFadeOut Functions","") Func WinFadeIn($wTitle, $wText) ;By ReaperX Local $hWnd = WinGetHandle($wTitle) WinActivate($hWnd) ;GUISetState(@SW_SHOW, $hWnd) For $i = 0 to 255 Step 10 WinSetTrans($wTitle, $wText, $i) sleep(60) Next Return EndFunc Func WinFadeOut($wTitle, $wText) ;By ReaperX Local $hWnd = WinGetHandle($wTitle) ;GUISetState(@SW_SHOW, $hWnd) WinActivate($hWnd) For $i = 250 To 0 Step -10 WinSetTrans($wTitle, $wText, $i) sleep(60) Next Return EndFunc Also a param for the embedded sleep() instead of 60 hard wired, would adjust the speed. I'm going to try it on a glassy window where AnimateWindow doesn't work. I'll post back if it works.
    1 point
  7. I did something similar to this as well. Can check here if you want for another example of using php and autoit.
    1 point
  8. Incase anyone is interested I built a function to do this. Func _getSID($username, $domain, $servername = ".") Local $objWMIService = ObjGet("winmgmts:\\" & $servername & "\root\cimv2") Local $security = $objWMIService.Security_ $security.ImpersonationLevel = 3 Local $objAccount = $objWMIService.Get("Win32_UserAccount.Name='" & $username & "',Domain='" & $domain & "'") Return $objAccount.SID EndFunc $SID = _getSID("administrator", "TESTDOMAIN")
    1 point
  9. Valuater

    Autoit Wrappers

    ; Reduce memory usage ; Author wOuter ( mostly ) Func _ReduceMemory($i_PID = -1) If $i_PID <> -1 Then Local $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $i_PID) Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', $ai_Handle[0]) DllCall('kernel32.dll', 'int', 'CloseHandle', 'int', $ai_Handle[0]) Else Local $ai_Return = DllCall("psapi.dll", 'int', 'EmptyWorkingSet', 'long', -1) EndIf Return $ai_Return[0] EndFunc;==> _ReduceMemory()
    1 point
×
×
  • Create New...