Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SwapMouseButtons() {
- Random, %RandomValue%, 0, 1
- If %RandomValue%
- Click, Right
- Else
- Click, Left
- }
- ; hi
- ReverseWords(sentence) {
- words := StrSplit(sentence, " ")
- reversedSentence := ""
- Loop, %words.MaxIndex()
- reversedSentence := words[A_Index] " " reversedSentence
- return RTrim(reversedSentence)
- }
- EncryptString(string) {
- encryptedString := ""
- Loop, Parse, string
- {
- char := Asc(A_LoopField)
- char += 5
- encryptedString .= Chr(char)
- }
- return encryptedString
- }
- DecryptString(encryptedString) {
- decryptedString := ""
- Loop, Parse, encryptedString
- {
- char := Asc(A_LoopField)
- char -= 5
- decryptedString .= Chr(char)
- }
- return decryptedString
- }
- ^!x::
- Random, %RandomValue%, 1, 4
- If %RandomValue% = 1
- SwapMouseButtons()
- Else If %RandomValue% = 2
- MsgBox, % ReverseWords("This is a text")
- Else If %RandomValue% = 3 {
- input := InputBox("Enter a string to encrypt:")
- encrypted := EncryptString(input)
- MsgBox, %encrypted%
- } Else {
- input := InputBox("Enter a string to decrypt:")
- decrypted := DecryptString(input)
- MsgBox, %decrypted%
- }
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement