gatt Posted May 21, 2017 Posted May 21, 2017 Hello guys, could someone help me do a script to EDIT a regedit key and add a RANDOM value to it? -EXAMPLE of a random key with random value- HKEY_CURRENT_USER\Console String name: colortable00 type: REG_SZ value: 233 <- I want change that 233 example value to a random generated number like 983, 237 etc any number
Subz Posted May 21, 2017 Posted May 21, 2017 RegWrite("HKCU\Console", "colortable00", "REG_SZ", Random(100, 999, 1))
gatt Posted May 21, 2017 Author Posted May 21, 2017 Thankyou bro, ill test it right now, and to add random to just a part of word example the value is: Intel i7700HQ i want random just those numbers "7700"
Subz Posted May 21, 2017 Posted May 21, 2017 (edited) RegWrite("HKCU\Console", "colortable00", "REG_SZ", "Intel i" & Random(1000, 9999, 1) & "HQ") Edited May 21, 2017 by Subz Changed it from 100-999 to 1000-9999
gatt Posted May 21, 2017 Author Posted May 21, 2017 How can i add random just to exaclty numbers like random (6000,7000,8000,9000) not 6000 to 9000 but just those numbers
anthonyjr2 Posted May 22, 2017 Posted May 22, 2017 15 hours ago, gatt said: How can i add random just to exaclty numbers like random (6000,7000,8000,9000) not 6000 to 9000 but just those numbers How about this? Local $randIndex = Random(0,3,1) Local $numArr[4] = [6000,7000,8000,9000] RegWrite("HKCU\Console", "colortable00", "REG_SZ", "Intel i" & numArr[randIndex] & "HQ") UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI=
Danp2 Posted May 22, 2017 Posted May 22, 2017 15 hours ago, gatt said: How can i add random just to exaclty numbers like random (6000,7000,8000,9000) not 6000 to 9000 but just those numbers RegWrite("HKCU\Console", "colortable00", "REG_SZ", "Intel i" & Random(6, 9, 1) & "000HQ") P.S. Can you explain why you need to do this? Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now