Leaderboard
Popular Content
Showing content with the highest reputation on 11/11/2012 in Posts
-
Someone I know wanted me to show them how to get started with scripting. Instead of giving him a one to one I decided to make recordings so that anyone can get the help. I know there are other tutorials out there on youtube but sometimes one type of video style or person's personality may be more acceptable than another, so feel free to check them out and tell me what you think. I am not done yet by a mile but I made what I have so far public. I will be making a lot more videos both on the basics and then more task orientated videos like how to write and read to files, how to make GUI's etc etc. http://www.youtube.com/playlist?list=PLNpExbvcyUkOJvgxtCPcKsuMTk9XwoWum&feature=view_all That play list link will be updated with more videos as and when I record them.1 point
-
NEW! File Properties Modifier v0.2
mesale0077 reacted to cyberbit for a topic
Super Update! Now supports full console actions and running commands from a text file! Run fropmod ? for options. Using the GUI: Drag and drop a file to the dropbox at the top. To set a date/time pair to the current date and time, right mouse click the control and hit Set to Now. Hold Shift to use alternate options. Hash is a slightly trimmed MD5 of the entire file, so large files will take a bit to compute. Using the CmdLine: FropMod uses a linear-style command line interface. Commands are linked together to perform tasks. Files are loaded using fropmod f <filename> or, to be compatible with native Windows functionality, fropmod <filename>. * Note that this mode will only function if the only parameter is the filename. Avoid using wildcards in the filename, as they will not always act as excepted. If the working directory is changed, FropMod will correctly handle relative paths. Every command after f applies to the file passed to f. There is no save command, so each operation is applied immediately. If ? is used, the GUI is automatically suppressed and further actions are ignored. ? is not valid except as the first parameter. nogui may be used at any place in the command string, except within parameters of other commands. It will suppress the creation of the GUI, and cause FropMod to exit immediately after all commands are parsed. Attributes (a) use the following format: +-RASHOT (Read-Only, Archive, System, Hidden, Offline, Temporary). The attributes N, D, and C (Normal, Directory, Compressed) are documented, but read-only. The Offline attribute is not compatible with files on removable drives. Additionally, Normal only appears when all other attributes are removed. Dates (d[m|c|a]) use the following format: YYYYMMDDHHmmss. Use the 24hr clock. I think these are broken right now (?) but if they work for you, great. Opening the file as an archive (z) extracts dependencies into a temporary folder, then opens the file through it. Only 63 parameters can be passed through the command line (including both commands and their values) due to AutoIt limitations, but larger strings can be used in an .fm1 script, and be run fully. FropMod Scripts (.fm1) are run using the e command. Technically they can be of any extension, but I may add action verbs to these files to run on double click in the future. Format of an .fm1 script: [FMScript] ;comment command [parameter] ;comment command [parameter] ;comment ;comment ... In an .fm1 script, there is no limit to the number of commands that will be parsed. Limit one command per line, as the parser will break if they are stacked. Comments can be by themselves or in-line with commands, using a semicolon. All white space is trimmed off the end of a command, as well. Scripts may be called from other scripts. Used properly, this allows for complex building of batch processing. HOWEVER, DO NOT COMMIT A MAJOR PROGRAMMING SIN AND CALL A SCRIPT IN ITSELF! This will kick off an infinite recursion that will quickly drag your system down to a speed at which an Apple 2 could compete. Moral of the story: be careful. The sources use the WinAPIEx and Resources UDFs. Here's the updated source and dependencies: fropmodsrc0.2.zip Modifies timestamps and attributes of files and directory trees. Can be used to fix EPOCHed files in some cases. Supports Drag & Drop. Supports console actions and text file scripts. Included in the archive is the source, examples and compiled x86/x64 EXEs with icon. Previous versions: Changelog: Regards, Cyberbit1 point -
RegFreeCOM Au3X Example
Professor_Bernd reacted to ptrex for a topic
RegFreeCOM Au3X Example Some time ago, someone in the support forum was asking if it is possible to distribute COM DLL's, on different machines, and not registering them. Well infact it is possible, using the MS SxS Manifest approach. For those who don't know what SxS is, it's an other word for ESCAPING DLL HELL : More information on how to build RegFreeCOM Manifest files, look here : Simplify App Deployment with ClickOnce and Registration-Free COM Download this example. RegFreeCOM_Au3X_Example.zip Save it to a machine running at least XP, and don't register any AutoItX3.dll. Run the "RegFreeCOM_Au3X_Example.exe" and see what happenes. Copy it to an other machine an try again. You will see that you are liberated from DLL registration as of now. The SxS technique is using an XML Manifest file to replace the need to use "regsvr32" for registering the COM objects. For those who remember my example on how to create COM objects, without the need of a DLL. This is next complimentary technique,l that allow you to create, run and distribute COM objects, by just distributing some files. This is an other example : Make sure no Au3X.Dll is installed on that machine. Or run : regsvr32 "C:\Program Files\AutoIt3\AutoItX\AutoItX3.dll" /u In order to run this -> Compile the code to RegFreeCOM_Au3X_Example.exe And put it in the same folder as where the Manifest files are located. (Can be a USB stick) $oAutoIt = ObjCreate("AutoItX3.Control.1") $oAutoIt.Run("notepad.exe") ;Wait for the window "Untitled" to exist and be active $oAutoIt.WinWaitActive ("Untitled") $oAutoIt.Send("{Enter}") $oAutoIt.Send("This is an example of : ") $oAutoIt.Send("{Enter}") sleep(500) $oAutoIt.Send("How to get rid of the need of the registry,") $oAutoIt.Send("{Enter}") sleep(1000) $oAutoIt.Send("in order to run COM object like Au3X.dll") $oAutoIt.Send("{Enter}") sleep(1000) $oAutoIt.Send("{Enter}") $oAutoIt.Send("{Enter}") $oAutoIt.send("Enjoy!") See here for more REGFREE examples tested on different platforms : https://www.autoitscript.com/forum/topic/204813-use-autoitx-as-com-rot-object-without-regsvr32-registration/?do=findComment&comment=1472426 https://www.autoitscript.com/forum/topic/204813-use-autoitx-as-com-rot-object-without-regsvr32-registration/?do=findComment&comment=1472602 Enjoy !! ptrex1 point -
Thanks Czardas, I'll take a look. I'm still running into issues, here is the code I am trying to run, modeled after the example from Melba23: Global $aFuncs[5] =["Func_1(3)", "Func_2(4)", "Func_3(5)", "Func_4(8)", "Func_5(9)"] While 1 $iStart = Random(0, 4, 1) For $i = 0 To 4 $iIndex = Mod($i + $iStart, 5) ConsoleWrite($aFuncs[$iIndex]) Call($aFuncs[$iIndex]) Next ConsoleWrite(@CRLF) If MsgBox(4, "Finished", "Ready for another run?") = 7 Then ExitLoop EndIf WEnd Func Func_1($var) ConsoleWrite("Func 1 called " & $var * 4 & @CRLF) EndFunc Func Func_2($var) ConsoleWrite("Func 2 called " & $var * 4 & @CRLF) EndFunc Func Func_3($var) ConsoleWrite("Func 3 called " & $var * 4 & @CRLF) EndFunc Func Func_4($var) ConsoleWrite("Func 4 called " & $var * 4 & @CRLF) EndFunc Func Func_5($var) ConsoleWrite("Func 5 called " & $var * 4 & @CRLF) EndFunc Its breaking cause of the variables in the funtions, but from the console output that I wrote, it appears to call: Func_$iIndex(4), but it doesn't actually ever run it. The console output never shows up.1 point
-
Iceburg, Glad I could help. Incidentally, just for completeness you can also do the loopback like this: $iStart = Random(1, 12, 1) For $i = $iStart To 12 ConsoleWrite($i & @CRLF) Next For $i = 1 To $iStart -1 ConsoleWrite($i & @CRLF) NextBut using Mod is far more elegant in my opinion. M231 point
-
Iceburg, I would put the function names into an array and then use the numbers generated as the indices to pull the name and run it using Call: Global $aFuncs[5] =["Func_1", "Func_2", "Func_3", "Func_4", "Func_5"] While 1 $iStart = Random(0, 4, 1) For $i = 0 To 4 $iIndex = Mod($i + $iStart, 5) Call($aFuncs[$iIndex]) Next ConsoleWrite(@CRLF) If MsgBox(4, "Finished", "Ready for another run?") = 7 Then ExitLoop EndIf WEnd Func Func_1() ConsoleWrite("Func 1 called" & @CRLF) EndFunc Func Func_2() ConsoleWrite("Func 2 called" & @CRLF) EndFunc Func Func_3() ConsoleWrite("Func 3 called" & @CRLF) EndFunc Func Func_4() ConsoleWrite("Func 4 called" & @CRLF) EndFunc Func Func_5() ConsoleWrite("Func 5 called" & @CRLF) EndFuncAll clear? M231 point
-
thanks for share the code!1 point