Jump to content

How to save the count after a script closes


lolcatz
 Share

Go to solution Solved by lolcatz,

Recommended Posts

I was trying to make an untenanted program activator. 

I was trying to send a activation code but it blocks it. 

It does allow me manually to ctr paste the code in but cant sending (^v) wont work.

 

So i deiced to make a script that every time i press ctr V it copies the next code to clip broad.  For example  i press ctr V one time it sends "A"  Press control V  manually  again then it will send "B" and the next time "C" to keep going trough the list.

My problem is making it to keep the same count every time i close the program.  I cant rly do this because it will just reset $var to 1 every time the script is open.

$var= = 1


If $var = 1 Then

ClipPut ("I am copied to the clipboard") 
$var = $var+1
ElseIf $var = 2 Then
ClipPut ("b")
$var = $var+1
 Else
$var=3 Then
ClipPut ("c")
$var = $var+1
    
EndIf
 

  How would u go about solving this problem?

Edited by lolcatz
Link to comment
Share on other sites

this seems to work

Global $var = 1
  HotKeySet("^v","hotkey")
while 1
  
  

 Global $a = "section a"
 Global $b = "section b"
 Global $c = "section c"
    WEnd
func hotkey()
   
If $var = 1 Then
MsgBox("","","CTRL + v pressed once")
clipput($a)
$var = $var+1
ElseIf $var = 2 Then
   MsgBox("","","CTRL + v pressed twice")
ClipPut ($b)
$var = $var+1
 
elseif $var=3 Then
MsgBox("","","CTRL + v pressed thrice")
ClipPut ($c)
Exit
$var = $var+1
    
EndIf
 EndFunc

o I find it hard to believe that any program can "block" autoit considering it can just manipulate mouse clicks and keystrokes so to block autoit you'd have to block any method of interacting with the program.

also as to what was said above you can save any data to a variety of different file types

$file = "path/file.txt"
fileopen($file)
filewrite($data & @CRLF)
fileclose($file)
Edited by markyrocks
Link to comment
Share on other sites

 find it hard to believe that any program can "block" autoit considering it can just manipulate mouse clicks and keystrokes so to block autoit you'd have to block any method of interacting with the program.

also as to what was said above you can save any data to a variety of different file types

 

Yeah I the script i write works just fine on notepad command prompt and everything else. But idk it just none of the script works when that window is active. I has to do everything manually. Maybe its the way auto it sends the info. IDK.  

Link to comment
Share on other sites

  • Moderators

martyrocks,

 

I find it hard to believe that any program can "block" autoit considering it can just manipulate mouse clicks and keystrokes so to block autoit you'd have to block any method of interacting with the program

Not at all rare - for example, many games have automation-resistent interfaces. :)

lolcatz,

We do not need to know if that is the case you are facing (read the Forum rules to see why) but it might well be the answer to your difficulties. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...