Jump to content

shovetech

Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

shovetech's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Valuater, I'm just starting to use your software XProTec for a simple general download-able application and self-registration/one-time payment. So far it's working good, but I have a few questions: 1) If I enter an SMTP server such as Gmail so I may receive emails, is my password fairly protected? I know I could setup my own smtp server, but for now just want to keep it simple. 2) I notice on this forum it says (free) on XProTec. Do you offer a paid version? If so, what are the differences and how much? 3) I notice a lot of entries for ClickTask.com in the file. Is this your server, or can I set this to my own site/server? 4) Can i disable trial all-together? 5) What are you thoughts about RSA key pairs being used to make the application more portable once activated? (I'm not so worried about copying to multiple machines, the cap would be ex 15). Basically, I'm making a small app, probably gonna charge $5 -$15, just to get some payment for my work, and hopefully to continue to make it better over time (time, ahhh time lol). I'm not trying to make this super duper hacker proof, I just want to get tiny compensation for the work. Anyway, hey thanks for a great product, and sorry for all the questions. I know you probably get this alot. Thanks, shovetech
  2. @Nighter, I'm having the same problem trying to use the Zlib library (v1.2.5 from zlib.net) Could you post a working sample of code to make inflate work? I tried using uncompress, but the destination size (decompressed size) is unknown. I'd like to just parse the stream. Here is the example I'm working from: http://www.zlib.net/zlib_how.html I've got a struct created, and a DllCall, but using inflateInit_ crashes, while inflateInit returns @error = 3. Any help would be much appreciated. Thanks
  3. Thank you for the feedback. I updated to v1.1.6 which fixes this issue. Also, make sure you end the drive letter with a backslash (ex. g:\) when specifying source/destination.
  4. llewxam: I like your thinking about a dual progress bar. One for current file, and one for total transfer complete. I've updated my code once again to add decimal places when displaying byte data in variable (default is 2). I also tried my attempt at the dual progress bar idea. As of this post, version is v1.1.3
  5. This script will change the boot mode (ex. safe mode, safe mode networking, etc) automatically on a Windows system. The reason: I needed a single script to change the boot mode, agnostic of the underlying Windows OS. Any feedback / improvements / suggestions are definitely welcome. Update: v1.0.2: Fixed some bugs and cleaned code a bit BootModes_v1.0.2.au3
  6. I haven't tried any Micrsoft APIs yet, I just assumed from reading some other posts around the net that people were reporting they were not able to get an explorer-like copy dialog box when using WinPE. This is what prompted me to create my own. As for full installs of XP/Vista/Win7, I'm sure you can do this pretty easy. I've updated my code here a bit. It now supports copying of files or directories as input. As far as the file size (ex. 1.3 GB) showing as 1 GB, this is by design. You can extend this to any number of decimal places you like by editing Func progressUpdate the line: GUICtrlSetData($lblbytes, Int($byteprefix) & " " & $bytesuffix & " / " & Int($sourceprefix) to this: GUICtrlSetData($lblbytes, Round($byteprefix, 3) & " " & $bytesuffix & " / " & Round($sourceprefix,3)
  7. My code is not good by any means though. As it stands, it can only copy a single file. I'm working on having it copy multiple files (directories, etc.), using only the copy command. I was thinking about using xcopy, but wanted to keep the depencancy list minimal. Anyway, looking forward to seeing your code. (That is until AutoIT internal devs create a function called '_CopyWithProgress' LOL!)
  8. Sorry, which script were you referring to? If it's mine above, what about it should be changed?
  9. I wrote a progress bar for a single file copy here. All it uses is the native windows copy command (any version), and displays a progress bar with speed, bytes transfered, and estimated time remaining. http://www.autoitscript.com/forum/index.php?showtopic=15384&st=0&p=755467&#entry755467
  10. I've updated my above posted script here: http://www.autoitscript.com/forum/index.php?showtopic=15384&st=0&p=755467&#entry755467
  11. Like others, I too wanted a way to display a progress bar while copying a file. Unfortunately, since I'm using WinPE 2.0, I can't get a native explorer-type progress dialog, as the necessary DLL's aren't included. I wrote my own that only relies on the 'copy' command with any version of Windows (including WinPE). Attached is the version I wrote. It's meant to be compiled an run as a stand-alone executable. Any improvements and suggestions would be appreciated. Update: v1.1.6: Fixed a bug where copying to/from the root of a drive (ex. c:\, d:\, etc.) was handled incorrectly. v1.1.5: Fixed a bug where if /k switch is given and file transfer was too fast, peak speed would show 0 bytes/s. v1.1.4: Fixed a bug where empty directories were reporting failure, although copy operation was successful. v1.1.3: adds two progress bars for current progress, and total progress if /k switch is given, shows peak (highest) transfer rate during operation v1.1.0: supports copying directories CopyFileProgress_v1.1.6.au3
  12. I wrote this script for the same reasons as above, I needed a progress bar while copying a single file, but reading/writing using a custom function wasn't yielding good performance. I found a way to use the copy command and retrieve information about how much data was being copied by using ProcessGetStats: AutoItSetOption("MustDeclareVars", 1) ; Displays progress bar when copying a single file If ($CmdLine[0] < 2) Then MsgBox(0, "Error", "You must specify both source and destination files") Exit EndIf Global $helpmsg $helpmsg = "CopyFileProgress.exe [options] source destination" & @CRLF _ & " options:" & @CRLF _ & " /y = suppress prompt to overwrite destination file" & @CRLF _ & " /title:<title> = set title of copy dialog box" & @CRLF _ & " source = source file" & @CRLF _ & " destination = destination file" & @CRLF Dim $forceoverwrite = 0 Dim $title = "Copying files..." Dim $source = "" Dim $destination = "" Dim $cmdopts = $CmdLine ; Loop through command args for switches If ($cmdopts[0] > 2) Then For $a = 1 to ($cmdopts[0] - 2) Select Case StringLower($cmdopts[$a]) = "/y" $forceoverwrite = 1 case StringLower(StringLeft($cmdopts[$a], 7)) = "/title:" $title = StringSplit($cmdopts[$a], ":") $title = $title[2] case $cmdopts[$a] = "/?" MsgBox(0, "Help", $helpmsg) Exit Case Else MsgBox(0, "Help", $helpmsg) Exit EndSelect Next EndIf $source = $cmdopts[($cmdopts[0] -1)] $destination = $cmdopts[($cmdopts[0])] ; Check that source file exist If Not (FileExists($source)) Then MsgBox(0, "Error", $source & " file does not exist.") Exit EndIf ; If destination exist, ask if ok to overwrite If (FileExists($destination)) Then If ($forceoverwrite = 0) Then If (MsgBox(260, "Overwrite", $destination & " already exists. Overwrite?") = 7) Then Exit EndIf EndIf If Not (FileDelete($destination)) Then MsgBox(0, "Error", "Could not copy to " & $destination) Exit EndIf EndIf ; Get source file size Dim $sourcesize = FileGetSize($source) Dim $sourceprefix = 0 Dim $sourcesuffix = "" getByteSuffix($sourcesize, $sourceprefix, $sourcesuffix) ; Copy file, querying process for IO bytes written Dim $starttime = TimerInit() Dim $destinationsize = 0 Dim $progress = 0 Dim $spin = "|" ; Display progress bar and run copy command ProgressOn($title, "Please wait...", "Preparing...", -1, -1, 16) Dim $pid = Run(@ComSpec & " /c copy /y " & chr(34) & $source & chr(34) & " " & Chr(34) & $destination & Chr(34), @ScriptDir, @SW_HIDE) If ($pid = 0) Then MsgBox(0, "Error", "Error copying file") Exit EndIf While (ProcessExists($pid)) Local $procstats = ProcessGetStats($pid, 1) If (IsArray($procstats) And UBound($procstats) > 4) Then $destinationsize = $procstats[4] If ($destinationsize = 0) Then ProgressSet(0, "", "Calculating size ...") Else $progress = Int(($destinationsize / $sourcesize) * 100) For $x = 1 to 10 progressUpdate($progress, $destinationsize) Sleep(100) Next EndIf EndIf WEnd ; After copy finished, display destination file size $destinationsize = FileGetSize($destination) $progress = Int(($destinationsize / $sourcesize) * 100) progressUpdate($progress, $destinationsize) Sleep(500) ProgressOff() ; Compare source file size and destination file size If ($sourcesize <> $destinationsize) Then MsgBox(0, "Error", "Source and destination file sizes are different. Could not copy.") Exit EndIf Exit Func progressUpdate($progress, $destsize) If ($progress > 100) Then $progress = 100 EndIf Local $byteprefix = 0 Local $bytesuffix = "" If (StringLen($spin) > 50) Then $spin = StringRight($spin, 1) Switch StringRight($spin, 1) Case "|" $spin = StringReplace($spin, "|", "/", 1, 2) Case "/" $spin = StringReplace($spin, "/", "-", 1, 2) Case "-" $spin = StringReplace($spin, "-", "\", 1, 2) Case "\" $spin = StringReplace($spin, "\", ".", 1, 2) & ".|" EndSwitch getByteSuffix($destsize, $byteprefix, $bytesuffix) ProgressSet($progress, "Source: " & $source & @LF & "Destination: " & $destination & @LF & $spin, Round($byteprefix, 2) & " " & $bytesuffix & " / " & Round($sourceprefix, 2) & " " & $sourcesuffix) EndFunc Func getByteSuffix ($bytes, ByRef $byteprefix, ByRef $bytesuffix) $byteprefix = $bytes $bytesuffix = "bytes" If ($byteprefix > 1024) Then $byteprefix = ($byteprefix / 1024) $bytesuffix = "KB" If ($byteprefix > 1024) Then $byteprefix = ($byteprefix / 1024) $bytesuffix = "MB" If ($byteprefix > 1024) Then $byteprefix = ($byteprefix / 1024) $bytesuffix = "GB" If ($byteprefix > 1024) Then $byteprefix = ($byteprefix / 1024) $bytesuffix = "TB" If ($byteprefix > 1024) Then $byteprefix = ($byteprefix / 1024) $bytesuffix = "PB" EndIf EndIf EndIf EndIf EndIf EndFunc Hope this helps, Doug
×
×
  • Create New...