Jump to content

blademonkey

Active Members
  • Posts

    416
  • Joined

  • Last visited

Profile Information

  • WWW
    http://www.dorkside.com

blademonkey's Achievements

Universalist

Universalist (7/7)

4

Reputation

  1. Yes this is "possible" but it involves a bit of haberdashery. My intent for doing this was to create a constant whose content was randomly generated (for integrity and security reasons). Here's how i did it: - Created a primary script and added and include statement that pointed an include file which will create a global constant. - Created a secondary script that would generate the content that was randomized and output that content to include.au3. - Compiled that script into an exe. - Went into the compile options in Scite and specified to 1) run the secondary.exe before compile and 2) to delete the generated included.au3 file after compile. - Hit compile and voila! Kludgy, but it works.
  2. That worked beautifully, Thank you. here's a generic version of my code: Opt("GUIOnEventMode", 1) $App_Height = 200 $App_Width= 300 $GUIMain_window = GUICreate("testapp", $app_width, $app_height) GUIRegisterMsg($WM_NCLBUTTONDBLCLK, "TitleBarClicked") Func TitleBarClicked() Dim $a_WinPos = WinGetPos($GUIMain_window) if $a_WinPos[3] > 40 Then WinMove($GUIMain_window,"",Default,Default,Default,1) Else WinMove($GUIMain_window,"",Default,Default,Default,$App_Height) EndIf EndFunc
  3. what if my app is OnEvent based?
  4. I'm trying to find a way to trigger a function after detection of a doubleclick in the title bar of my Autoit Script Custom window. What i'm trying to do is implement a specific resize function (i have the function working), i just need some guidance on where to look for trapping the event. thanks -B
  5. Hmm i'm re-editing my post. you're matching the title of the window, and if it matches you're telling it to Exit. if you dont want it to exit the script, don't use exit. not sure if that helps.
  6. here's the one liner in dos if you're interested. for /f "tokens=*" %I in ('dir /b ^| find /v /i ".doc"') do del %I
  7. hmm yea, i can't get it to reproduce anymore. Thanks, however.
  8. sounds like an integrity question. Maybe using MD5sum could be useful to you? this would ensure that a renamed binary of the same name would not be able to run unless the checksum matched that of the original, which isn't impossible, but it's less probable.
  9. looks like you're doing a @comspec /k which lingers and doesn't autoterminate. i believe you want to use /c not /k.
  10. it could be that the dos DEL application's success return code is 0, thus negating your test. do you know all of the return codes for del?
  11. Greetings, wow, it's been a while since i've posted in here (4+ years). it's good to be back and to see that AutoIt is going on strong. Here's the behavior i'm trying to understand. background: I have a specific Autoit application that invokes a fileopendialog. The initdir parameter is set to @scriptdir. When running a single instance of the application, the fileopendialog behaves as expected. The fileopendialog window opens and the folder location is correctly set to the @scriptdir location (of that instance). When running a second or third instance (where the exes themselves are located in a different location), the fileopendialog sets the initdir to one of the first two initdir (aka @scriptdir) locations. this is a little frustating, and im not sure how to control this behavior, since i dont exactly know when and where @scriptdir is technically fetching its information. I've tried assigning the @scriptdir setting to a user defined variable @curfolder in the begining of my script, which works well in scite, but not when compiled. I have several theories (one is that multiple instances somehow share the same variables/PID) but would like to get confirmation on what is driving this behavior. I've also tried using @scriptfullpath. Any help is appreciated. hopefully i've described the situation well enough, let me know if have not.
  12. This is great. Is it possible to make a portion of the control hyperlinked and the rest, leave it as regular text?
  13. no worries. I was actually genuinely fascinated by the coincidence. I have no need to ask you to discontinue your script, that seems rather petty. In fact you seem to have put in a little more time and thought into it. carry on.
  14. How interesting. I wrote a very similar app last year (which got me some 15 minutes of fame on a mobile site). http://www.autoitscript.com/forum/index.ph...c=38259&hl= http://codescribes.blogspot.com/2007/07/roll-up-app_23.html Your functions are somewhat similar to the ones i used. The name resemblance is even uncanny. #include<array.au3> #include<guiconstants.au3> $sExist=0 Opt("MouseCoordMode", 0) Opt("GUIoneventmode", 1) dim $aWinSize[1],$aWinHwnd[1], $aCurWinSize[1], $aNewWinSize if @OSVersion == "WIN_VISTA" Then $iSize = 130 $btnposx = 130 $btnposy = 2 Else $iSize = 100 $btnposx = 75 $btnposy = 5 EndIf $curapp = WinGetHandle("") $aCurWinSize= WinGetPos($curapp) While 1 $newapp = WinGetHandle("") $aNewWinSize = WinGetPos($newapp) if WinGetTitle($newapp ) <> "RollupWindow" then If $newapp <> $curapp Then $curapp = $newapp $sExist =0 Else if winactive($curapp) Then If _IsPressed('01')=1 then sleep(150) While _IsPressed('01') GUIDelete(WinGetHandle("RollupWindow")) $sExist =0 Sleep(150) WEnd EndIf while winactive($curapp) if $sExist =0 then RollupBtn() Send("!{TAB}") if winactive($curapp)=0 then ExitLoop EndIf sleep(50) WEnd Else GUIDelete(WinGetHandle("RollupWindow")) $sExist =0 EndIf Endif EndIf If _IsPressed("23") Then ExitLoop EndIf sleep(250) WEnd Func toggleRoll() sleep(200) if WinExists("RollupWindow") then GUIDelete(WinGetHandle("RollupWindow")) $sExist = 0 dim $aWinpos $winhwnd = $curapp $aWinpos = WinGetPos($winhwnd) if $aWinpos[3] > $iSize then ConsoleWrite($aWinpos[3] &">" &$iSize&@lf) _ArrayAdd($aWinHwnd,$winhwnd) _ArrayAdd($aWinSize,$aWinpos[3]) WinMove($winhwnd,"",$aWinpos[0],$aWinpos[1],$aWinpos[2],27) Else if $aWinpos[3] <= $iSize then $iArInx = _ArraySearch($aWinHwnd,$winhwnd) If not @error then $iNewSize = $aWinSize[$iArInx] WinMove($winhwnd,"",$aWinpos[0],$aWinpos[1],$aWinpos[2],$iNewSize) _ArrayDelete($aWinSize,$iArInx) _ArrayDelete($aWinHwnd,$iArInx) Else WinMove($winhwnd,"",$aWinpos[0],$aWinpos[1],$aWinpos[2],400) EndIf EndIf EndIf EndFunc Func RollupBtn() if WinExists("RollupWindow") then GUIDelete(WinGetHandle("RollupWindow")) $sExist = 0 EndIf if $sExist = 0 Then $sExist =1 $winhwnd = WinGetHandle("") $aWinpos = WinGetPos($winhwnd) While WinActive($curapp) $rollupwdw = GUICreate("RollupWindow",17,17,$aWinpos[0]+$aWinpos[2]-$btnposx,$aWinpos[1]+$btnposy,$WS_POPUP,$WS_EX_TOOLWINDOW) $rollupbtn=GUICtrlCreateButton(chr(175),0,0,17,17,$BS_CENTER ) GUICtrlSetOnEvent($rollupbtn,"toggleRoll") GUISetState(@SW_SHOW) WinSetOnTop($rollupwdw,"",1) sleep(10) WEnd Else EndIf EndFunc
  15. if you're being lazy about it you could create a dummy txt file in the root dir then set the file attributes to read only and then perform a dirremove on the root folder. change the txt attrib back, then delete. or do it properly and loop through all of the sub folders and delete them. -Blademonkey
×
×
  • Create New...