
wiredbits
Active Members-
Posts
47 -
Joined
-
Last visited
wiredbits's Achievements

Seeker (1/7)
0
Reputation
-
When running script as admin and UAC is enabled drag drop does not work on my end, anyone know of a fix for this? ( Personally I disable UAC but would like the drag drop feature to work on systems that have it enabled) Oops, forgot to mention I am using the 64 bit version of Vista test.au3
-
While playing one day I came up with the following #include <GuiConstants.au3> ;#include <GUIConstants.au3> $ExcommandID=0 $maxMenuItems=3 Dim $ExItems [$maxMenuItems][3] $ITEM_ID=0 $ITEM_NAME=1 $ITEM_COMMAND=2 $MenuFile="ExMenu.ini" ;Generated with Form Designer preview GUICreate("Test", 412, 297, 302, 218, $WS_OVERLAPPEDWINDOW) GUISetState(@SW_SHOW) IF ReadMenuIni() Then Main() Exit Func Main() Local $i,$x $x=$ExItems[0][0] While 1 $msg = GuiGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop case $ExItems[1][$ITEM_ID] To $ExItems[$x][$ITEM_ID] For $i=1 To $ExItems[0][0] If $ExItems[$i][$ITEM_ID]=$msg Then ExitLoop EndIf Next;i ; MsgBox(0,"", $ExItems[$i][$ITEM_NAME] & @CRLF & $ExItems[$i][$ITEM_COMMAND]) RunCommand($ExItems[$i][$ITEM_COMMAND]) Case Else ;;; EndSwitch WEnd EndFunc Func ReadMenuIni() Local $i,$varSections,$varKeysAndValues,$retvalue $retvalue=1 If FileExists($MenuFIle) Then $ExcommandID=GUICtrlCreateMenu("Commands") $ExItems[0][0]=0 $varSections = IniReadSectionNames($MenuFile) If @error Then MsgBox(4096, "", "Trouble Reading Sections In:" &$MenuFile) $retvalue=0 Else For $i=1 To $varSections[0] $varKeysAndValues = IniReadSection($MenuFile, $varSections[$i]) If @error Then MsgBox(4096, "", "Trouble Reading Keys In: " &$MenuFile & " Section: " &$varSections[$i]) $retvalue=0 ExitLoop EndIf BuildMenu($varSections[$i],$varKeysAndValues) Next EndIf Else MsgBox(4096, "", "Unable To FInd: " &$MenuFile) $retvalue=0 EndIf Return $retvalue ENDFunc Func BuildMenu($menu,Byref $varKeysAndValues) Local $i,$nmenuID,$cnt IF $ExItems[0][0]+$varKeysAndValues[0][0]> UBound($ExItems)-1 Then $maxMenuItems+=$varKeysAndValues[0][0]+1 ReDim $ExItems[$maxMenuItems][3] EndIf $cnt=$ExItems[0][0] $nmenuID=GUICtrlCreateMenu($menu,$ExcommandID) For $i=1 To $varKeysAndValues[0][0] $cnt=$cnt+1 $nmenu=$varKeysAndValues[$i][0] IF $varKeysAndValues[$i][0]="Separator" and $varKeysAndValues[$i][1] ="True" Then $nmenu="" $nmenuID=GUICtrlCreateMenuItem($nmenu,$nmenuID) $ExItems[$cnt][$ITEM_ID]=$nmenuID $ExItems[$cnt][$ITEM_COMMAND]=$varKeysAndValues[$i][1] $ExItems[$cnt][$ITEM_NAME]=$varKeysAndValues[$i][0] Next $ExItems[0][0]=$cnt EndFunc Func RunCommand($command) Opt("RunErrorsFatal", 0) Run($command) If @error Then MsgBox(8256,"Unable To Execute",$command &@CRLF &"Check Path and/or File Name.") EndIf Opt("RunErrorsFatal", 1) EndFunc Example ini file [My Computer] Open=explorer.exe /n, ::{20D04FE0-3AEA-1069-A2D8-08002B30309D} Explore=explorer.exe /e, ::{20D04FE0-3AEA-1069-A2D8-08002B30309D} Device Manager= RunDLL32.EXE devmgr.dll DeviceManager_Execute Disconnect Mapped Drive=RunDLL32.EXE USER.DLL,wnetdisconnectdialog Map A Network Drive=RunDLL32.EXE shell32.dll,SHHelpShortcuts_RunDLL Connect System Properties=RunDLL32.EXE shell32.dll,Control_RunDLL sysdm.cpl,,0 Separator=True Restart=Shutdown.exe -r -t 00 Shut Down=shutdown.exe -s -t 00 [Contro Panell] Open=Panel=RunDLL32.EXE shell32.dll,Control_RunDLL Add Remove Programs=RunDLL32.EXE shell32.dll,Control_RunDLL appwiz.cpl,,0 Administrative Tools=Open=explorer.exe /n C:\Documents and Settings\All Users\Start Menu\Programs\Accessories\System Tools Internet Options=RunDLL32.EXE shell32.dll,Control_RunDLL inetcpl.cpl,,# Network Connections=Explorer.exe ::{7007ACC7-3202-11D1-AAD2-00805FC1270E}
-
How To Act On Drag And Drop Event?
wiredbits replied to nitro322's topic in AutoIt GUI Help and Support
Hi You could use beta version and wait for event $GUI_EVENT_DROPPED then get file name from macro @GUI_DRAGFILE ....$file=@GUI_DRAGFILE -
yes, easy to code for reverse values but for completeness I just wanted to set styles. This drove me batty since I could not find any value to use with sendmessage that would change styles for a slider. Oh well I will work with what i have. Thanks
-
HI Thanks but I have already tried the above, unless I am missing somthing when TBS_DOWNISLEFT is set moving the slider down decreases value instead of the default which is increase. Again thanks
-
Hi Does anyone know how to force style of a vertical slider to TBS_DOWNISLEFT? Simple but it is driving me crazy Thanks Jim
-
Thanks It was fun and gives me a starting place in case i want to use more than just two controls, plus i like watching the mixer change while i play with its widgets... Code could be cleaned up, I need to write a routine that grabs defines in a .h file and converts them to Autoit format. Would make life easier for me, hmmm maybe then go back and scan autoit code and make another file with only defines used. Jim
-
HI All worked ok on my end also but I have noticed the behavior of labels has changed in 1.07. In the TV_HittestArrays.au3 I posted a while back in scraps the label that i drag has a grey background now instead of white. Also noticed the entire rect region is drawn (and willl overwrite rest of gui) for a label where in older versions just the area that held text was drawn. Not sure if tis helps but...maybe i need to play with styles a bit. Jim .
-
hi I needed a routine that would select input line and after searching I found the mixer device API calls which suited my needs,. for fun I also did a set volume routine. Most of the info came from : http://www.borg.com/~jglatt/tech/mixer.htm and of course http://msdn.microsoft.com/library/default....troldetails.asp Since I have two sound cards im my system I wrote the routines to handle mulitible mixer devices. You will need the latest betta to run and both routines need the include file. MXSelectInputSrc_include.au3 MXSelectInputSrc.au3 MXVolume.au3
-
Launching a pdf file from a script
wiredbits replied to ksv247's topic in AutoIt General Help and Support
Try this: $file=@ScriptDir & "\Documentation\Help.pdf" $command="C:\Windows\System32\Rundll32.exe Url,FileProtocolHandler " & $file Run($command) Hope it helps Jim -
Hi Take a look at he array example, thats is one way to track treeviews. Once Treeview and treeview array has been created you can just loop through array and search. Was this what meant? Jim
-
Hi Revised code, went back to hiding control during scroll while draging child treeview item. Did an array example which is more OnEvent friendly, added auto expand/collaspe parents in this example. Might add save/read Ini to array example. Jim
-
Hi I tried to keep examples as general as possible, I assumed most users would modify code to suit their needs. It was a lot of fun just playing around with the code, I could have made it more friendly for OnEvent mode....might go back and change a few things. Thanks Jim
-
HI I needed a hit test for treeview items and came up with this, included some examples/ideas on use. I am still playing with it so yell if any problems or other ideas on use. Oh also is my first DllStructCreate routine. Included examples: right mouse button (secondary) selection of Treeview item drag and drop child items between parents drag file onto treeview and if a hit add to treeview context menu cut, copy, paste, and delete a treeview item Oh a note on the context menus, I found an example in help file using dummy control and then calling API TrackPopupMenuEx ! Really nice, your able to control context menus on the fly! Cheers Jim Edit..u need beta 1.99 and if you use SciTE you will get an error on @GUI_DRAGFILE just continue with run, I added the key macro to SciTE's api file manually. TV_Hittest.au3 TV_HittestArrays.au3
-
AIBartPE - near "Explorer"like TaskBar for BartPE
wiredbits replied to Holger's topic in AutoIt Example Scripts
HI Very nice Holger, now its time for me to go back and play with BartPE again Jim .