This project has moved. For the latest updates, please go here.

Please add a "randomize variable"

Feb 5, 2015 at 9:37 AM
Please add a "randomize variable" to the interval.

eg. we set the 30 seconds interval and a randomization of 10, so it could be between 30secs and 40secs.

Thanks in advance!
Coordinator
Feb 5, 2015 at 10:08 AM
Hi,

You could use a Custom Script to edit the underlying XML file to change this setting on the fly.

Click the "Edit" button next to the Interval script (make sure the scripting language is set to PowerShell), and paste this in the Notepad window:
$LowerSeconds = 30
$UpperSeconds = 40
$MoveMouseXml = Join-Path $env:APPDATA "Ellanet\Move Mouse\Move Mouse.xml"

if (Test-Path -Path $MoveMouseXml) {
    $XmlDoc = New-Object System.Xml.XmlDocument
    $XmlDoc.Load($MoveMouseXml)
    $XmlDoc.SelectSingleNode("settings/second_delay").InnerText = Get-Random -Minimum $LowerSeconds -Maximum $UpperSeconds
    $XmlDoc.Save($MoveMouseXml)
}
Let me know if it works.
Mar 5, 2015 at 9:47 AM
Could I use this to randomize keystrokes up/down as well?

Cheers,
Kare
Coordinator
Mar 5, 2015 at 1:08 PM
Yes, although you could also just run this script at each interval which would be a lot simpler:
$KeyStroke = Get-Random -InputObject @("a", "b", "c", "d", "1", "2", "3", "4", "{CAPSLOCK}", "{NUMLOCK}")
$WshShell = New-Object -ComObject "WScript.Shell"
$WshShell.SendKeys($KeyStroke)
A random keystroke will be chosen from the supplied array.

More info on WSHShell.SendKeys() here:

http://www.devguru.com/technologies/wsh/17420

sw3103
Marked as answer by sw3103 on 3/20/2017 at 2:23 PM