-
Posts
75 -
Joined
-
Last visited
Everything posted by ActualAkshay
-
well nothing till now I saw these in my script $sSrc = _Iif(StringLeft($sSrc, 1) == "\", StringTrimLeft($sSrc, 1), $sSrc); remove \ from left $sSrc = _Iif(StringInStr($sSrc, ":"), $sSrc, $s_Path & "\" & $sSrc); check if path is absolute or dynamic and realized, I dont know how to parse out the actual arguments yet from these lines
-
Hey Guys, I need help in creating a function that uses GDI+ to create Metro style buttons, like in Windows 8 Sidebar, i have attached some example below: Earlier I used to design the buttons on photoshop but now I am thinking of doing it through code which would decrease the size of executable, also it would take time once for creating code rather than spending hours on photoshop. Here is the code I made till now, was able to draw only the button without text, as I suck on GDI+ #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Test", 615, 437) $Button1 = CtrlCreateButton("Button1", 48, 72, 100, 20) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func CtrlCreateButton($Text = "", $Left = 0, $Top = 0, $Width = 0, $Height = 0, $BGColor = 0xff00ff, $HoverColor = 0xbbbbbb, $FontSize = 10, $FontColor = 0xff456f, $FontFamily ="Arial", $WorkDir = @TempDir) _GDIPlus_Startup() ;Global $iWidth = 100, $iHeight = 100 ;dimension of the bitmap Local $iStride = 0, $pScan0 = 0, $iPixelFormat = $GDIP_PXF32ARGB ;some bitmap parameters Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $Width, "int", $Height, "int", $iStride, "int", $iPixelFormat, "ptr", $pScan0, "int*", 0) Local $hBitmap = $aResult[6] ;this is the handle of the new empty bitmap Local $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap) ;create a context to the bitmap handle to do some GDI+ operations ;Global Const $iBgColor = 0xFFDE2697 ;define background color -> ARGB -> 0xFFDE2697 _GDIPlus_GraphicsClear($hContext, $BGColor) ;clear empty bitmap with new color ;$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hContext) ;_GDIPlus_GraphicsDrawStringEx($hContext, $Text, _GDIPlus_FontCreate(_GDIPlus_FontFamilyCreate($FontFamily), $FontSize), _GDIPlus_RectFCreate(), _GDIPlus_StringFormatCreate(), _GDIPlus_BrushCreateSolid($FontColor)) $sFilename = $WorkDir & "\" & Chr(Random(65, 90, 1)) & Chr(Random(65, 90, 1)) & Random(1000000, 999999, 1) _GDIPlus_ImageSaveToFile($hBitmap, $sFilename) GUICtrlCreatePic($sFilename, $Left, $Top, $Width, $Height) _GDIPlus_GraphicsDispose($hContext) _GDIPlus_Shutdown() EndFunc ;==>MetroUICtrlCreateButton Please help me out guys... Thanks in advance
-
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
thanks again! -
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
Truly, I dont have much idea :S I want to learn desperately tough -
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
thanks, but cant it give FileInstall( ) too? -
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
Well I do see the array but its kind of strange, cant we just parse out the whole "FileInstall( src, des, flag)" txt into the array? -
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
check this out #include <Array.au3> Local $sData = "FileInstall('SOURCE', 'DEST', 0)" & @CRLF $sData &= 'FileInstall("SOURCE", "DEST", 0)' & @CRLF $sData &= 'FileInstall("SOURCE", "DEST")' & @CRLF $sData &= "FileInstall(" & '"SOURCE"' & ", 'DEST')" & @CRLF $sData &= "FileInstall('SOURCE', '1' & " & '"DEST"' & ")" Local $aSRE = StringRegExp($sData, 'FileInstall\(\h*([''"])(.+?)\1,\h*([''"])(.+?)\3\h*(?:,\h*(\d)\h*)?\)', 3) ; By guinness 2013. ConsoleWrite($sData) _ArrayDisplay($aSRE) Its still not working -
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
I think there is problem with this, I get error "Subscript used with non-Array variable." which means nothing is parsed out? -
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
Yes! I am doing that -
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
Thanks a lot! You are awesome! -
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
I want to parse out FileInstall too, can you help me with it? as for now, I am not at all good with RegXp -
Available functions Files to download WinAPIEx UDF v3.8 for AutoIt 3.3.6.1 Previous downloads: 22106 WinAPIEx UDF v3.8 for AutoIt 3.3.8.x Previous downloads: 4671 links not working
-
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
Thanks man, I love your snippets, you are a life saver you should really create a package of all your collection, just like CheatBook Database, something like "guinness database" -
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
Actually I do have logic in my head, but the problems strikes when I try to parse out text from a line that contains both ' and " -
Parsing out the strings between " " and ' '
ActualAkshay replied to ActualAkshay's topic in AutoIt General Help and Support
THAT IS VERY OBVIOUS! LOL i am actually working on an obfuscator -
I want to parse out the actual text the is in RED color from au3 script and place it in an array, the strings between " and ' symbols SAMPLE INPUT TEXT: #include "StaticConstants.au3" ;yes this is red text, but it has to be ignored as it is path to include file #include <WindowsConstants.au3> $TEXT = " yo yo 'yo' 'yo'yo 'yo' yo' " $fnScript = 'Auto Updater; (example script);' ;full script name $pScript = StringSplit(@ScriptName, '.') $dirMonter = @AppDataDir & '\monter.FM' ;directory for monter.FM's scripts $btnIni = GUICtrlCreateButton('View ' & $script & '.&ini', 4, 164, 115, 25) $btnFilUpd = GUICtrlCreateButton('View ' & $script & '.&upd', 126, 164, 119, 25) $YO = "hey'" & @TAB & '' & "" & '"' & "'world." ; tough one OUTPUT ARRAY: $array[0] => 8 $array[1] => "yo yo 'yo 'yo'yo 'yo' yo" $array[2] => 'Auto Updater; (example script);' $array[3] => '.' $array[4] => '\monter.FM' $array[5] => 'View ' $array[6] => '.&ini' $array[7] => 'View ' $array[8] => '.&upd' $array[9] => $array[10] => "hey'" $array[11] => '' $array[12] => "" $array[13] => '"' $array[14] => "'world." How this can be achieved, would be glad if anyone provide me with actual solution
-
Organize Includes in SciTE4Autoit3
ActualAkshay replied to Xenobiologist's topic in AutoIt Example Scripts
PS the software is really nice. but it isnt able to detect default include path on 64 bit version (didnt check on 32 bit) maybe you can fetch it from registry using $Def_Include_Dir = RegRead("HKLM\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") & "\Include" -
Organize Includes in SciTE4Autoit3
ActualAkshay replied to Xenobiologist's topic in AutoIt Example Scripts
I am running windows 8 64 bit, maybe due to difference in the actual path of program files in 64 bit and 32 bit version, it wasnt able to load the file, or their might be problem related the the permissions for program files folder. I didnt see the source code so I am not sure about anything. Thanks anyways