gatt Posted May 21, 2017 Share 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 Link to comment Share on other sites More sharing options...
Subz Posted May 21, 2017 Share Posted May 21, 2017 RegWrite("HKCU\Console", "colortable00", "REG_SZ", Random(100, 999, 1)) Link to comment Share on other sites More sharing options...
gatt Posted May 21, 2017 Author Share 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" Link to comment Share on other sites More sharing options...
Subz Posted May 21, 2017 Share 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 Link to comment Share on other sites More sharing options...
gatt Posted May 21, 2017 Author Share Posted May 21, 2017 Could i private you? Link to comment Share on other sites More sharing options...
Subz Posted May 21, 2017 Share Posted May 21, 2017 Sure Link to comment Share on other sites More sharing options...
gatt Posted May 21, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
anthonyjr2 Posted May 22, 2017 Share 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= Link to comment Share on other sites More sharing options...
Danp2 Posted May 22, 2017 Share 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 Link to comment Share on other sites More sharing options...
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