Jump to content

reset or clear the cache - (Moved)


stiv
 Share

Go to solution Solved by Musashi,

Recommended Posts

Good day,
it is possible to clear or reset a cache. because I use Clipget
and when going to next step I don't want the previous variable copied in the cache to be stored.

example of my code

 

 

 Local $sResult6 = _Excel_RangeRead($oWorkbook, Default, "R2")
    Local $sData6 = ClipGet() ; Click Obtiene la variable
    ClipPut($sResult6)
    $sData6 = ClipGet() ; Envia La variable obtenida
    Send("^v") ; Pega la variable
    Sleep(1000)
    Send("{ENTER}")
    Sleep(1000)
    Send("{TAB 2}")
    Sleep(3000)
    Send("{ENTER}")
 
Local $sResult = _Excel_RangeRead($oWorkbook, Default, "G2")
 
$sData = ClipGet() ; Envia La variable obtenida
   
    send("{CTRLDOWN}c{CTRLUP}")
    $Copy = ClipGet() ;
    If StringInstr($Copy,"prueba1",0) then ;Cuando el archivo excel termine su recorrido, realiza una validacion de la casilla T2 para dar por terminado el robot
     Sleep(2000)
     Send("{CTRLDOWN}f{CTRLUP}")
     Sleep(4000)
 
       
   
    ElseIf StringInstr($Copy,"prueba2",0) then
     Sleep(2000)
     Send("{CTRLDOWN}f{CTRLUP}")
 
   
    ElseIf StringInstr($Copy,"prueba3",0) then
     Sleep(2000)
     Send("{CTRLDOWN}f{CTRLUP}")    Exit        
 
    EndIf
Link to comment
Share on other sites

  • Developers

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Solution

I'm not sure if this solves your problem, but ClipPut("") clears the contents of the clipboard.

You may also try this code (it's a bit older ;))

; There has to be some data in the clipboard for this example :
Local $sData
$sData = ClipGet()
MsgBox(0, "Display data from ClipGet:", $sData)

_ClipEmpty()

$sData = ClipGet()
MsgBox(0, "Display data after _ClipEmpty():", $sData)

Func _ClipEmpty()
    Local $Success = 0
    DllCall('user32.dll', 'int', 'OpenClipboard', 'hwnd', 0)
    IF @error = 0 THEN
        DllCall('user32.dll', 'int', 'EmptyClipboard')
        IF @error = 0 THEN $Success = 1
        DllCall('user32.dll', 'int', 'CloseClipboard')
        IF $Success THEN Return 1
    ENDIF
    DllCall('user32.dll', 'int', 'CloseClipboard')
    Return 0
EndFunc

Possibly it also benefits to have a look at the current help regarding : _ClipBoard_Empty

Edited by Musashi

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

  • 3 weeks later...

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...