Leaderboard
Popular Content
Showing content with the highest reputation on 03/05/2012 in all areas
-
FileSystemMonitor UDF
mLipok reacted to seangriffin for a topic
This is a UDF that allows users to monitor the file system, using a combination of two internal Windows API Functions: ReadDirectoryChangesW; andSHChangeNotifyRegisterThe purpose of this UDF is to record all file system events occurring within a given path. REQUIREMENTS: AutoIt3 3.2 or higherLIST OF FUNCTIONS: EXAMPLES: The following example is of a GUI that dynamically updates when files, folders and drives change within the file system (outside of the GUI). The "Drives" list automatically updates when new drives are connected to the computer, and when existing drives are disconnected. The "Directory Listing" automatically updates whenever an external application (ie. Windows Explorer) adds, renames or deletes files and folders in the directory currently displayed. When the "Directory Listing" is automatically updated with additions or changes, the list is automatically scrolled to that change. The user may click on an item in the "Drives" list to change the "Directory Listing" to that drive. The user may also double click on a directory (<DIR>) in the "Directory Listing" to navigate to that directory. Double-clicking on "<DIR> .." will navigate back to the previous directory. The user may also press "F2" to rename an item in the "Directory Listing", and press "Delete" to delete/recycle an item in the "Directory Listing". FileSystemMonitor Explorer example.au3 The following example monitors file system events. Run this script, and then use various applications (ie. Windows Explorer) whilst the script is running, to manipulate files, folders and drives within "C:\". The changes you make should get recorded in the GUI of this example. The user may also change the Path and click "Use Path" to change monitoring to another path, other than "C:\". FileSystemMonitor example.au3 DOWNLOAD: Latest Version - v0.4 (02/05/10) FileSystemMonitor.au3 BACKGROUND: The script for ReadDirectoryChangesW comes from the following brilliant topic: [NOW WORKING] a (broken) monitor file changes script which uses ReadDirectoryChangeW The script for SHChangeNotifyRegister comes from the equally brilliant topic: SHChangeNotifyRegister() Receive notifications of shell changes. The combination of the two functions allows monitoring of most I/O functions in Windows, including: folder and file renamesfolder and file createsfolder and file deletesfolder and file updatesdrive additionsdrive removalsI began this script by using SHChangeNotifyRegister alone, but then found that it didn't catch file creations from many apps (like Internet Explorer or Opera file downloads). A detailed description of the problem is mentioned in this article: Shell Notifications Here's an excerpt: "...The Origin of Events So now, you know how to receive any of these shell notifications that are floating around, but who is actually generating them? According to the documentation, 'An application should use this function (SHChangeNotify) if it performs an action that may affect the shell'. But that seems to be a bit of wishful thinking. I can't imagine there are many applica tion developers that really give a damn whether the shell is kept informed of their actions... ...The result is that these notifications tend to be a little bit unreliable. The likelyhood of you getting an event for something, may depend on what explorer windows happen to be open at the time. The shell also only has a 10 item event buffer, and may replace some events with a generic SHCNE_UPDATEDIR in case of an overflow. In short: don't depend on these notifications for any mission-critical applications..." I then switched to ReadDirectoryChangesW, but found that it lacks in features, such as detecting removable drive additions and removals. The result I implemented was a combination of the two. I prefer the Shell Change Notify method much more than the ReadDirectoryChangeW method, though because of the issues with it (as described above) I've had to implement both approaches to catch all events. I like the fact that the Shell Change Notify method is very asynchronous in nature, running in the background as a registered Windows Message, with a seperate AutoIT function being activated whenever an event occurs, unlike ReadDirectoryChangeW's polling nature. I tried to put the monitoring of ReadDirectoryChangeW inside the MY_SHNOTIFY function above, but it didn't work. I'm still unsure why? If anyone can work it out please let me know. According to other forum topics, each call to ReadDirectoryChangeW should pull the next unprocessed event (that has occurred) out of it's queue (if that's the right word for it). So in theory, it shouldn't matter where it's called, or when. However calling it from within MY_SHNOTIFY doesn't work (even after changing the above code to make all variables global, and therefore accessible to MY_SHNOTIFY). Yet cutting and pasting the ReadDirectoryChangeW script into the Main Loop (While 1) does work. Strange.1 point -
This is just an example. Do with it what you want... #Include <Constants.au3> #Include <GUIConstantsEx.au3> #Include <StaticConstants.au3> #Include <TabConstants.au3> #Include <WindowsConstants.au3> Dim $Pic[5] GUICreate('MyGUI', 705, 369) GUISetBkColor(0xFFFFFF) GUICtrlCreatePic('img_bg.bmp', 0, 0, 705, 369) GUICtrlSetState(-1, $GUI_DISABLE) For $i = 0 To 4 $Pic[$i] = GUICtrlCreatePic(@ScriptDir & '\img_black.bmp', 10, 24 + 50 * $i, 162, 49) GUICtrlCreateLabel('Tabsheet' & $i, 21, 40 + 50 * $i, 140, 18, $SS_CENTER) GUICtrlSetFont(-1, 11, 400, 0, 'Tahoma') GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetcolor(-1, 0xFFFFFF) Next $Tab = GUICtrlCreateTab(172 + 4, 10 + 4, 523 - 8, 349 - 8) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateTabItem('Tabsheet0') GUICtrlCreateEdit('', 190, 28, 487, 313) GUICtrlCreateTabItem('Tabsheet1') GUICtrlCreateButton('OK', 398, 319, 70, 23) GUICtrlCreateTabItem('Tabsheet2') GUICtrlCreateTabItem('Tabsheet3') GUICtrlCreateTabItem('Tabsheet4') GUICtrlCreateTabItem('') GUISetState() $Item = -1 $Over = -1 While 1 $Info = GUIGetCursorInfo() If @error Then If $Over <> -1 Then GUICtrlSetImage($Pic[$Over], @ScriptDir & '\img_black.bmp') EndIf $Over = -1 Else $Index = _Index($Info[4]) If $Index <> $Over Then If $Over <> -1 Then GUICtrlSetImage($Pic[$Over], @ScriptDir & '\img_black.bmp') EndIf If ($Index <> -1) And ($Index <> $Item) Then GUICtrlSetImage($Pic[$Index], @ScriptDir & '\img_over.bmp') $Over = $Index Else $Over = -1 EndIf EndIf EndIf $Msg = GUIGetMsg() If $Item = -1 Then $Msg = $Pic[0] $Item = 1 EndIf Switch $Msg Case 0 ContinueLoop Case $GUI_EVENT_CLOSE Exit Case $Pic[0] To $Pic[UBound($Pic) - 1] If $Msg <> $Pic[$Item] Then GUICtrlSetImage($Pic[$Item], @ScriptDir & '\img_black.bmp') GUICtrlSetcolor($Pic[$Item] + 1, 0xFFFFFF) GUICtrlSetImage($Msg, @ScriptDir & '\img_white.bmp') GUICtrlSetcolor($Msg + 1, 0x313A42) $Item = _Index($Msg) GUICtrlSendMsg($Tab, $TCM_SETCURFOCUS, $Item, 0) $Over = -1 EndIf EndSwitch WEnd Func _Index($CtrlID) For $i = 0 To UBound($Pic) - 1 If ($CtrlID = $Pic[$i]) Or ($CtrlID = $Pic[$i] + 1) Then Return $i EndIf Next Return -1 EndFunc ;==>_Index TabSkin.zip Previous downloads: 774 TabSkin.zip1 point
-
Hi, if you have large scripts, it is often usefull to make a description for some variables ( i.e. you have an array and make comments for types of data in rows and columns ). But if you need this information, you must scroll back to this comment and read it. Now i've made a script, that searchs this comment for the current variable (on which the cursor is) and write this to console output. Edit 2012-03-04: Now you can show it also as CallTip. Switch between calltip or console output by settings in properties (see instructions in header) current version: v0.2 Edit 2012-03-05: Added: Multiline Tips with "n" as line break current version: v0.3 Edit 2012-03-08: Added: Refers to created variable in line before with: Local $GuiMain = GuiCreate(...) ;-1 tip for variable "$GuiMain"current version: v0.4 Edit 2012-03-12: Script now totally rebuild. It can also be variables of the same name used on several occasions (in different functions). The creation of the tips have to be done within the same range of validity (in the same function or global). The script is looking for tips for the current variable in the current scope. It will always output the variable name and scope $VarBefore [ Global ] This is the tip for $VarBefore or $iSelf [ Local: Func _Testfunc() ] This is the tip for $iSelf Now it is also possible to use all kinds of tip creation (tip in [multiple] region, tip with "at", tip with "-1") at the same time. Because that, the properties entrie "Variables.Tip.Region.*.au3" is needless. current version: v0.5 Edit 2012-04-17: Added: Installer.au3 - all required changes in SciTEUser.properties made by installer - detects automatically free command number - GUI to configure settings - you can add an entry to context menu too Put both files (VarGetTip.lua and Install_VarGetTip.au3) together in an directory, than run au3-script. Edit 2012-04-20: There was a little bug in the installer.au3. So it hasn't take effect to check "show tip as call tip". Fixed. Edit 2012-05-06: NEW Now you can also use tip for functions, that you've created inside your script. Use it so: Func _SomeFunc() ;-f Tip for this functionnSecond line of this tip current version: v0.6 ---------------------------------------------------------------------------------------------------------------------------------- -- VarGetTip -- For variables in a separate area of the script deposited tips: -- #region - Variables-Tip -- ; $Variable1 This is the tip for variable 1 -- ; $Variable2 This is the tip for variable 2 -- ; $Variable3 This is the tip for variable 3 -- #endregion -- or they are in a comment line with a tag (the "at" sign) somewhere in the script created: -- ;@ $Variable1 This is the tip for variable 1 -- or direct after creation of a variable in the next line with '-1' refers to this: -- $Variable -- ;-1 here my tip for $Variable -- -- or tip for functions: -- In following line after function-headline write your tip: -- Func _SomeFunc() -- ;-f Tip for this functionnSecond line of this tip -- Output: -- _SomeFunc( ) -- Tip for this function -- Second line of this tip -- -- It can also be variables of the same name used on several occasions (in different functions). -- The creation of the tips have to be done within the same range of validity (in the same function or global). -- The script is looking for tips for the current variable in the current scope. -- It will always output the variable name and scope (if tip exists) -- $VarBefore [ Global ] -- This is the tip for $VarBefore -- or -- $iSelf [ Local: Func _Testfunc() ] -- This is the tip for $iSelf -- -- You can create multiline tips by using "n" to mark the line break -- i.e. -- ;@ $VariableXY comment1ncomment2ncomment3 -- output: -- $VariableXY -- comment1 -- comment2 -- comment3 -- -- Save the script as "..SciTELUAVarGetTip.lua" -- -- In "SciTEUser.properties" will create a hotkey to invoke the function -- command.name.37.*.au3=Variables Tip -- command.37.*.au3=dofile $(SciteDefaultHome)/Lua/VarGetTip.lua -- command.mode.37.*.au3=subsystem:lua,savebefore:no -- command.shortcut.37.*.au3=Ctrl+Alt+V -- -- In addition, create a properties value that determines whether output to console or Calltip -- Variables.Tip.CallTip.*.au3=1 (1=as CallTip, 0=output to console) -- -- Usage -- - Place the cursor on the variable/function-call (or touching them) -- - Call the Hotkey -- - If existing a tip, it will shown as calltip or written to console ---------------------------------------------------------------------------------------------------------------------------------- DL before: 54 Install_VarGetTip.au3 VarGetTip_0.6.zip1 point
-
SciTE v 3.20 Beta available
jaberwacky reacted to Jos for a topic
I have merged Neils SciTE v 3.20 Source with our own repository and have made it available in a separate directory in the Beta site. SciTE v 3.20 SciLexer.dll v3.20 History of changes My Changes: Support for "(" in filenames on error lines to fix the issue that double clicking these error lines wouldn't work.Jump to Line and Column now when double clicking the error from au3Check.Fold in Commentblocks fixes for the AU3 lexer.Word Highlighting modifications: highlight.current.word=1 highlight.current.word.by.style=1 highlight.current.word.colour=#00D040 #~ highlight.current.word.autoselectword=1 #~ highlight.current.word.wholeword=1 #~ highlight.current.word.matchcase=1 #~ highlight.current.word.minlength=2 Appreciate when people can test and let me know if they see issues or if all is working fine. Cheers, Jos Updated to 3.20 6/9/2012.1 point -
I made a UDF to return the code for each button to dispense with the table of key codes. _keycodes.au3 ; #FUNCTION# ===================================================================================== ; Name...........: _keycodes ; Language ......: English ; Description ...: Return the key code ; Syntax.........: $variable = _KeyCodes($sInputKey) ; Parameters ....: key ; Return values..: Success - Virtual Key Code ; Failure - @ Error returns "0" if the code is not listed ; Author ........: Belini ; Country.........:Brazil ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: Yes ; ================================================================================================ #CS ;#EXAMPLE# ======================================================================================= #include <WinAPI.au3> ;#include <_keycodes.au3> Const $MASCARA = 0x8000 Const $tecla = _keycodes("a") MsgBox('', '', "The key code is " & '"' & $tecla & '"') While 1 $estado = _WinAPI_GetAsyncKeyState($tecla) If BitAND($estado, $MASCARA) Then MsgBox('', '', "The key was pressed.") WEnd ; ================================================================================================ #CE Func _KeyCodes($sInputKey) Local $iRetCode = 0 If Not IsString($sInputKey) Then Return SetError(1, 0, $iRetCode) Switch $sInputKey Case "a" $iRetCode = 0x41 ; ==> A Case "b" $iRetCode = 0x42 ; ==> B Case "c" $iRetCode = 0x43 ; ==> C Case "d" $iRetCode = 0x44 ; ==> D Case "e" $iRetCode = 0x45 ; ==> E Case "f" $iRetCode = 0x46 ; ==> F Case "g" $iRetCode = 0x47 ; ==> G Case "h" $iRetCode = 0x48 ; ==> H Case "i" $iRetCode = 0x49 ; ==> I Case "j" $iRetCode = 0x4A ; ==> J Case "k" $iRetCode = 0x4B ; ==> K Case "l" $iRetCode = 0x4C ; ==> L Case "m" $iRetCode = 0x4D ; ==> M Case "n" $iRetCode = 0x4E ; ==> N Case "o" $iRetCode = 0x4F ; ==> O Case "p" $iRetCode = 0x50 ; ==> P Case "q" $iRetCode = 0x51 ; ==> Q Case "r" $iRetCode = 0x52 ; ==> R Case "s" $iRetCode = 0x53 ; ==> S Case "t" $iRetCode = 0x54 ; ==> T Case "u" $iRetCode = 0x55 ; ==> U Case "v" $iRetCode = 0x56 ; ==> V Case "w" $iRetCode = 0x57 ; ==> W Case "x" $iRetCode = 0x58 ; ==> X Case "y" $iRetCode = 0x59 ; ==> Y Case "z" $iRetCode = 0x5A ; ==> Z Case "0" $iRetCode = 0x30 ; ==> 0 Case "1" $iRetCode = 0x31 ; ==> 1 Case "2" $iRetCode = 0x32 ; ==> 2 Case "3" $iRetCode = 0x33 ; ==> 3 Case "4" $iRetCode = 0x34 ; ==> 4 Case "5" $iRetCode = 0x35 ; ==> 5 Case "6" $iRetCode = 0x36 ; ==> 6 Case "7" $iRetCode = 0x37 ; ==> 7 Case "8" $iRetCode = 0x38 ; ==> 8 Case "9" $iRetCode = 0x39 ; ==> 9 Case "Num *" $iRetCode = 0x6A ; ==> Num * Case "Num 0" $iRetCode = 0x60 ; ==> Num 0 Case "Num 1" $iRetCode = 0x61 ; ==> Num 1 Case "Num 2" $iRetCode = 0x62 ; ==> Num 2 Case "Num 3" $iRetCode = 0x63 ; ==> Num 3 Case "Num 4" $iRetCode = 0x64 ; ==> Num 4 Case "Num 5" $iRetCode = 0x65 ; ==> Num 5 Case "Num 6" $iRetCode = 0x66 ; ==> Num 6 Case "Num 7" $iRetCode = 0x67 ; ==> Num 7 Case "Num 8" $iRetCode = 0x68 ; ==> Num 8 Case "Num 9" $iRetCode = 0x69 ; ==> Num 9 Case "Num ." $iRetCode = 0x6E ; ==> Num . Case "Num /" $iRetCode = 0x6F ; ==> Num / Case "Num +" $iRetCode = 0x6B ; ==> Num + Case "Num -" $iRetCode = 0x6D ; ==> Num - Case "F1" $iRetCode = 0x70 ; ==> F1 Case "F2" $iRetCode = 0x71 ; ==> F2 Case "F3" $iRetCode = 0x72 ; ==> F3 Case "F4" $iRetCode = 0x73 ; ==> F4 Case "F5" $iRetCode = 0x74 ; ==> F5 Case "F6" $iRetCode = 0x75 ; ==> F6 Case "F7" $iRetCode = 0x76 ; ==> F7 Case "F8" $iRetCode = 0x77 ; ==> F8 Case "F9" $iRetCode = 0x78 ; ==> F9 Case "F10" $iRetCode = 0x79 ; ==> F10 Case "F11" $iRetCode = 0x7A ; ==> F11 Case "F12" $iRetCode = 0x7B ; ==> F12 Case "Middle mouse" $iRetCode = 0x04 ; ==> Middle mouse Case "Right mouse" $iRetCode = 0x02 ; ==> Right mouse Case "Left mouse" $iRetCode = 0x01 ; ==> Left mouse Case "Mail" $iRetCode = 0xB4 ; ==> Mail Case "Pause" $iRetCode = 0x13 ; ==> Pause Case "Media" $iRetCode = 0xB5 ; ==> Media Case "Next Track" $iRetCode = 0xB0 ; ==> Next Track Case "Previous Track" $iRetCode = 0xB1 ; ==> Previous Track Case "Right Ctrl" $iRetCode = 0xA3 ; ==> Right Ctrl Case "Right Alt" $iRetCode = 0xA5 ; ==> Right Alt Case "Scrol Lock" $iRetCode = 0x91 ; ==> Scrol Lock Case "Print Screen" $iRetCode = 0x2C ; ==> Print Screen Case "Right Shift" $iRetCode = 0xA1 ; ==> Right Shift Case "Left Win" $iRetCode = 0x5B ; ==> Left Win Case "Right Win" $iRetCode = 0x5C ; ==> Right Win Case "Sleep" $iRetCode = 0x5F ; ==> Sleep Case "Context Menu" $iRetCode = 0x5D ; ==> Context Menu Case "ctrl alt Break" $iRetCode = 0x03 ; ==> ctrl alt Break Case "Browser Favorites" $iRetCode = 0xAB ; ==> Browser Favorites Case "Browser Home" $iRetCode = 0xAC ; ==> Browser Home Case "Browser Refresh" $iRetCode = 0xA8 ; ==> Browser Refresh Case "Browser Stop" $iRetCode = 0xA9 ; ==> Browser Stop Case "Browser Forward" $iRetCode = 0xA7 ; ==> Browser Forward Case "Browser Back" $iRetCode = 0xA6 ; ==> Browser Back Case "Browser Search" $iRetCode = 0xAA ; ==> Browser Search Case "Play" $iRetCode = 0xB3 ; ==> Play Case "Stop" $iRetCode = 0xB2 ; ==> Stop Case "Volume Up" $iRetCode = 0xAF ; ==> Volume Up Case "Volume Down" $iRetCode = 0xAE ; ==> Volume Down Case "Mute" $iRetCode = 0xAD ; ==> Mute Case "Page Up" $iRetCode = 0x21 ; ==> Page Up Case "Page Down" $iRetCode = 0x22 ; ==> Page Down Case "Num Lock" $iRetCode = 0x90 ; ==> Num Lock Case "Caps Lock" $iRetCode = 0x14 ; ==> Caps Lock Case "Left Ctrl" $iRetCode = 0xA2 ; ==> Left Ctrl Case "Left Alt" $iRetCode = 0xA4 ; ==> Left Alt Case "Left Shift" $iRetCode = 0xA0 ; ==> Left Shift Case "Space" $iRetCode = 0x20 ; ==> Space Case "Backspace" $iRetCode = 0x08 ; ==> Backspace Case "Delete" $iRetCode = 0x2E ; ==> Delete Case "Insert" $iRetCode = 0x2D ; ==> Insert Case "Up" $iRetCode = 0x26 ; ==> Up Case "Down" $iRetCode = 0x28 ; ==> Down Case "Left" $iRetCode = 0x25 ; ==> Left Case "Right" $iRetCode = 0x27 ; ==> Right Case "Tab" $iRetCode = 0x09 ; ==> Tab Case "Esc" $iRetCode = 0x1B ; ==> Esc Case "End" $iRetCode = 0x23 ; ==> End Case "Home" $iRetCode = 0x24 ; ==> Home Case "Enter" $iRetCode = 0x0D ; ==> Enter Case "[" $iRetCode = 0xDD ; ==> [ Case "]" $iRetCode = 0xDC ; ==> ] Case "" $iRetCode = 0xE2 ; ==> Case ";" $iRetCode = 0xBF ; ==> ; Case "=" $iRetCode = 0xBB ; ==> = Case "~" $iRetCode = 0xDE ; ==> ~ Case "´" $iRetCode = 0xDB ; ==> ´ Case "'" $iRetCode = 0xC0 ; ==> ' Case Else Return SetError(1, 0, $iRetCode) EndSwitch If $iRetCode = 0 Then Return SetError(1, 0, $iRetCode) Return $iRetCode EndFunc ;==>_KeyCodes Example: #include <WinAPI.au3> #include "_KeyCodes.au3" Global Const $MASCARA = 0x8000 Global $sTecla = "a", _ ; Set the key... $iEstado, _ $sCode = _KeyCodes($sTecla) MsgBox(4096, "_KeyCode", 'The key code "' & $sTecla & '" is: ' & $sCode & @CRLF & _ "The program will be waiting for her down." & @CRLF & @CRLF & "Click [OK] to continue...") While 1 $iEstado = _WinAPI_GetAsyncKeyState($sCode) If BitAND($iEstado, $MASCARA) Then MsgBox(4096, "_KeyCode", 'The key "' & $sTecla & '" was pressed.') sleep(20) WEnd1 point
-
6105, But do you not realise that anything you post here - and the help you get from those who do not realise quite what you are up to - can be also read by those who might well use it for "bad activity"? I have already warned you earlier today about the number of times you have appeared on the Mod's radar. Either you stop asking questions about things which are forbidden by the Forum Rules or you will be removed from the Autoit community. We do not want the kind of script you seem to want to write in this forum. This is your last warning! M23 Edit: And we can see that you edited your post as well - not a sign of good intentions.1 point
-
1 point
-
I would recommend just using a blank line between each control if you are doing this just for organization. There is no good way to put all of those on the same line. That being said, here is one of the "no good" ways: $Close = GUICtrlCreateLabel("X", $Width - 15, 0, 11, 20) If GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS") And GUICtrlSetColor(-1, 0xFFFFFF) And GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) And GUICtrlSetCursor(-1, 0) Then ConsoleWrite('') $About = GUICtrlCreateLabel("?", $Width - 30, 0, 11, 20) If GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS") And GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) And GUICtrlSetColor(-1, 0xFFFFFF) And GUICtrlSetCursor(-1, 0) Then ConsoleWrite('') $Other = GUICtrlCreateLabel("+", $Width - 45, 0, 11, 20) If GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS") And GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) And GUICtrlSetColor(-1, 0xFFFFFF) And GUICtrlSetCursor(-1, 0) Then ConsoleWrite('') EDIT: Melba23 posted while I was writing this. His answer is best. Don't try to put them all on the same line1 point
-
1 point
-
SleeperCell42, Have a look at the FileOpen function in the Help file and look at the example below, you'll see (as 69255 mentioned) that certain requirements are missing. Also try to create variables that are a little more descriptive e.g. you're using $input for not only the file path but also the handle returned by FileOpen. Now it might not make a huge difference but in terms of reading it's easier to denote what variable comes from where and error checking is important too. Example() Func Example() Local $sFilePath = @ScriptFullPath Local $hFileOpen = FileOpen($sFilePath, 0 + 16) ; Just to show I'm using read mode. If $sFilePath = -1 Then Return SetError(1, 0, 0) EndIf Local $bRead = FileRead($hFileOpen) FileClose($hFileOpen) ; This is very important! $hFileOpen = FileOpen("Example_2.au3", 2 + 16) ; You have to specify that you want to write as well. If $sFilePath = -1 Then Return SetError(2, 0, 0) EndIf FileWrite($hFileOpen, $bRead) FileClose($hFileOpen) EndFunc ;==>Example1 point
-
toader, Be carefull with _stringbetween. The doc says It can return multiple rows as demonstrated by the following code ;::: #include <ARRAY.AU3>#include <STRING.AU3>$a = 'abcdefabcdabcdefghijdxyzc' $result = _StringBetween($a,'c','f') _arraydisplay($result) ConsoleWrite(_arraytostring($result) & @LF) If multiple rows are returned they are delimited by a "|". kylomas Edit: correction - if multiple rows are found you use arraytostring which inserts a delimiter of "|" between elements1 point
-
examples with amazing GUI
6105 reacted to Mikeman27294 for a topic
These are the includes that you should be using for that... this way, it will not crash. #include <APIConstants.au3> #include <Constants.au3> #include <GUIConstantsEx.au3> #include <MenuConstants.au3> #include <WinAPI.au3> #include <WinAPIEx.au3> Well if all you want is nice looking GUIs, then I can point you towards these: There was also an example script called "Some nice menu aesthetics", but no matter how much I search, I cannot find it again1 point -
stylish gui
6105 reacted to monoscout999 for a topic
Look for L0ader SetBitmap function, search the forum. if you don`t found anything with the forum search try Google this wayPNG Skin GUI site:www.autoitscript.com/forum/1 point -
1 point