Jump to content



Photo

Wiki FAQ Improvement Suggestion


  • Please log in to reply
29 replies to this topic

#1 rcmaehl

rcmaehl

    No where near a noob nor a pro coder.

  • Active Members
  • PipPipPipPipPipPip
  • 642 posts

Posted 03 April 2012 - 11:40 AM

I was browsing the FAQ when I came across this. Now I must say, this is some nice jury-rigging, however you shouldn't be pinging localhost and instead ping an address that does not exist such as 1.3.3.7 or 1.1.1.1. For example doing:

ping 1.3.3.7 -n 1 -w (delay here * 1000) -l 0 > nul

is a more precise delay than

ping -n (delay here) 127.0.0.1 > nul

as well as using less resources than the line above.

I'm actually interested in this, and I'll probably find an even better way in a few days (I've already got a lot of ideas)
Making dumb decisions and posting without thinking since August 7, 2011.Jury-rigging AutoIt to work how I want successfully since a while.Reading the manual since no one else seems to.My Github: https://github.com/rcmaehl/FCoFix-SoftwareWarning!: I'm a compulsive poster. When I post something in chat, ignore it unless it's a huge wall of text, because it's probably a compulsive post.





#2 Manadar

Manadar

    Taking a REST.

  • MVPs
  • 10,714 posts

Posted 03 April 2012 - 11:54 AM

Can I have sauce on that?

#3 rcmaehl

rcmaehl

    No where near a noob nor a pro coder.

  • Active Members
  • PipPipPipPipPipPip
  • 642 posts

Posted 03 April 2012 - 12:17 PM

Can I have sauce on that?


We're currently out.
Making dumb decisions and posting without thinking since August 7, 2011.Jury-rigging AutoIt to work how I want successfully since a while.Reading the manual since no one else seems to.My Github: https://github.com/rcmaehl/FCoFix-SoftwareWarning!: I'm a compulsive poster. When I post something in chat, ignore it unless it's a huge wall of text, because it's probably a compulsive post.

#4 Manadar

Manadar

    Taking a REST.

  • MVPs
  • 10,714 posts

Posted 03 April 2012 - 12:34 PM

We're currently out.

sauce.

Anyway, performance is a non-issue. If anyone is affected by ping to localhost, then I suggest that they stop running Windows on their PIC1650.

#5 rcmaehl

rcmaehl

    No where near a noob nor a pro coder.

  • Active Members
  • PipPipPipPipPipPip
  • 642 posts

Posted 03 April 2012 - 12:40 PM

sauce.

I know what sauce is. I was making a joke, and I did the performance testing myself.

Anyway points of my post:
1. We should replace 127.0.0.1 with an invalid IP You disproved
2. We should make the delay more precise by adding "-n 1 -w (delay in milliseconds) -l 0"

Edited by rcmaehl, 03 April 2012 - 12:41 PM.

Making dumb decisions and posting without thinking since August 7, 2011.Jury-rigging AutoIt to work how I want successfully since a while.Reading the manual since no one else seems to.My Github: https://github.com/rcmaehl/FCoFix-SoftwareWarning!: I'm a compulsive poster. When I post something in chat, ignore it unless it's a huge wall of text, because it's probably a compulsive post.

#6 Manadar

Manadar

    Taking a REST.

  • MVPs
  • 10,714 posts

Posted 03 April 2012 - 12:50 PM

We could make the delay more precise, but why would we .. Who has any requirement that their executable be deleted in exactly X milliseconds?

I hate to be the one to shoot this down, but if you feel it's really that big of a deal, maybe you can write an example and do some comparisons.

#7 guinness

guinness

    guinness

  • MVPs
  • 10,231 posts

Posted 03 April 2012 - 01:12 PM

I highly doubt anyone's going to care if a file is deleted in 50ms or 1000ms of running the _SelfDelete function, unless you can provide a plausible reason of why someone would want to. If you have an improvement the please post it to the Examples section, it's what I've done in the past with that function.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#8 rcmaehl

rcmaehl

    No where near a noob nor a pro coder.

  • Active Members
  • PipPipPipPipPipPip
  • 642 posts

Posted 04 April 2012 - 11:41 AM

I highly doubt anyone's going to care if a file is deleted in 50ms or 1000ms of running the _SelfDelete function, unless you can provide a plausible reason of why someone would want to. If you have an improvement the please post it to the Examples section, it's what I've done in the past with that function.


A time limited trial program (trial only works for like 30 minutes).
Making dumb decisions and posting without thinking since August 7, 2011.Jury-rigging AutoIt to work how I want successfully since a while.Reading the manual since no one else seems to.My Github: https://github.com/rcmaehl/FCoFix-SoftwareWarning!: I'm a compulsive poster. When I post something in chat, ignore it unless it's a huge wall of text, because it's probably a compulsive post.

#9 James

James

    jbrooksuk

  • MVPs
  • 9,468 posts

Posted 04 April 2012 - 01:59 PM

A time limited trial program (trial only works for like 30 minutes).

That's a shit reason.

A limited trial is designed for user interaction to be limited, not limiting the time it takes for code to execute.

#10 guinness

guinness

    guinness

  • MVPs
  • 10,231 posts

Posted 04 April 2012 - 04:17 PM

I agree with James, I've personally never known a time trial to require such precision before.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013


#11 Chimaera

Chimaera

    Sorry .. Where am i again?

  • Active Members
  • PipPipPipPipPipPip
  • 1,513 posts

Posted 04 April 2012 - 04:25 PM

Personally if id downloaded some software and it was a 30 min trial id be writing a stern mail to the developer about how much of a cheapskate dick he was not giving the consumer ample time to evaluate his product etc etc

I think opinion is against you on this one, it doesn't stop you developing it of course but expect people not to be happy.

#12 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,563 posts

Posted 04 April 2012 - 05:07 PM

if i found out that it had a 30 minute trial period, and i would, it wouldn't get downloaded and the download site would get blocked. end of story.
and even at that; the kind of precision you are talking about is never required in a timer situation. google for the average time it takes a person to blink. if i'm going to miss an event because i blinked then it's being far more precise than i will ever need or appreciate.

Edited by GEOSoft, 04 April 2012 - 05:10 PM.

GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#13 wraithdu

wraithdu

    I am less fun than a twisted ankle.

  • MVPs
  • 2,137 posts

Posted 04 April 2012 - 06:15 PM

Not that I really want to get involved, but perhaps he means to trial it for 30 minutes at a time. There are plenty of apps, typically audio recording or processing apps, that will only record time limited clips or insert audio watermarks during trial periods.

Skimmed the content of this too quickly before replying.

Edited by wraithdu, 06 April 2012 - 09:04 PM.


#14 Richard Robertson

Richard Robertson

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 9,692 posts

Posted 04 April 2012 - 06:26 PM

In which case, the self deleter doesn't make sense.

#15 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 04 April 2012 - 06:27 PM

Then why wpuld the program delete itself on completion?

Edited by Valik, 04 April 2012 - 06:27 PM.


#16 rcmaehl

rcmaehl

    No where near a noob nor a pro coder.

  • Active Members
  • PipPipPipPipPipPip
  • 642 posts

Posted 05 April 2012 - 11:49 AM

Then why would the program delete itself on completion?


The program would delete itself on completion because unlike some software, if I make a time limited program, I won't have it just sitting on a person's computer taking up space and serving no purpose. Instead, I'd have the script open up the purchasing information page and then delete itself. Secondly, the self-deleting program is generally used with AutoIt programs within AutoIt Programs (using FileInstall()).

Edited by rcmaehl, 05 April 2012 - 11:49 AM.

Making dumb decisions and posting without thinking since August 7, 2011.Jury-rigging AutoIt to work how I want successfully since a while.Reading the manual since no one else seems to.My Github: https://github.com/rcmaehl/FCoFix-SoftwareWarning!: I'm a compulsive poster. When I post something in chat, ignore it unless it's a huge wall of text, because it's probably a compulsive post.

#17 Richard Robertson

Richard Robertson

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 9,692 posts

Posted 05 April 2012 - 02:08 PM

No, Valik was referring to the "only run for 30 minutes at a time" example.

#18 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 05 April 2012 - 07:36 PM

The program would delete itself on completion because unlike some software, if I make a time limited program, I won't have it just sitting on a person's computer taking up space and serving no purpose. Instead, I'd have the script open up the purchasing information page and then delete itself. Secondly, the self-deleting program is generally used with AutoIt programs within AutoIt Programs (using FileInstall()).

You are incredibly stupid and your ideas are appalling.
  • James likes this

#19 James

James

    jbrooksuk

  • MVPs
  • 9,468 posts

Posted 05 April 2012 - 08:48 PM

You are incredibly stupid and your ideas are appalling.

He's a part of "LulzSec" what do you expect?

#20 guinness

guinness

    guinness

  • MVPs
  • 10,231 posts

Posted 05 April 2012 - 09:37 PM

I think it's suffice to say rcmaehl that you haven't provided a good enough example. If you did provide a 'plausible' example that required deletion to the nearest millisecond then you wouldn't be using _SelfDelete to achieve this.

Edited by guinness, 05 April 2012 - 11:59 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_DesktopDimensions()_DisplayPassword()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUISetIcon()_Icon_Clear()/_Icon_Set()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringIsValid()_StringReplaceWholeWord()_StringStripChar()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()AutoIt SearchAutoIt3 PortableAutoItWinGetTitle()/AutoItWinSetTitle()CodingFileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIGetBkColor()LockFile()PasteBinSciTE JumpSignature CreatorWM_COPYDATAMore Examples...Updated: 11/04/2013





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users