Skip to content

Instantly share code, notes, and snippets.

View akrnmd's full-sized avatar
🌴
On vacation

kin arima akrnmd

🌴
On vacation
View GitHub Profile
@akrnmd
akrnmd / TripleClick.script
Last active October 3, 2020 00:03
TripleClick. #SenseTalk #eggplant
put the RemoteWorkInterval into defaultRWI
put the MouseDoubleClickDelay into clickTime
set the RemoteWorkInterval to clickTime
MoveTo "[TargetImage]"
click
click
click
set the RemoteWorkInterval to defaultRWI
@akrnmd
akrnmd / ButtonCounterByImage.script
Last active October 3, 2020 00:03
Use the tab key to move the focus and count the number of buttons on the web's continuous form. #SenseTalk #eggplant
put 0 into MyCounter
TypeText tab
repeat while ImageFound(3, "[target image name on focus]")
TypeText tab
put 1 + MyCounter into MyCounter
end repeat
log MyCounter
@akrnmd
akrnmd / SwipeUpUntilTargetimage.script
Last active March 11, 2021 14:19
Procedure to repeat swipe up until targetimage is found. #SenseTalk #eggplant
function SwipeUpToTarget targetimage
//call example:
//get myfunctions.SwipeUpToTarget("[targetimage]")
Repeat until ImageFound(Image: targetimage, WaitFor:1)
SwipeUp
wait 1
End repeat
return
end SwipeUpToTarget
@akrnmd
akrnmd / ReadTextFile.script
Last active October 3, 2020 00:03
Example of reading a text file line by line and repeating processing until the last line. #SenseTalk #eggplant
set MyFile to resourcepath("textfile.txt")
repeat with MyLine = each line of file MyFile
typetext MyLine, returnKey
end repeat
@akrnmd
akrnmd / ForEachOfImageCollection.script
Last active October 3, 2020 00:03
Click all the images in the image collection one by one. #SenseTalk #eggplant
repeat with CurrentImage = each item of ImageInfo("[collection name]")
Click (Image:CurrentImage.imagepath, WaitFor:5)
end repeat
@akrnmd
akrnmd / RunOtherScriptWithParams.script
Last active October 3, 2020 00:02
Run other script with params. #SenseTalk #eggplant
//call example:
//run "RunOtherScriptWithParams" [MyText]
params MyText
TypeText MyText,Return
@akrnmd
akrnmd / UseLocalCommandAndGetResponseOnWindows.script
Last active October 3, 2020 00:02
Use Local Command And Get Response On Windows. #SenseTalk #eggplant
//use example:
//shell "c:\windows\system32\cmd.exe", <</c "ipconfig > C:\Users\[UserName]\tmp.txt">>
shell "c:\windows\system32\cmd.exe", <</c "[YourCommand] > [FileFullPath]">>
put file "[FileFullPath]" into FileContents
log FileContents
@akrnmd
akrnmd / ConnectSpecifiedNumberOfTimesUsingTry-Catch.script
Last active October 3, 2020 00:02
Connect specified number of times using Try-Catch. #SenseTalk #eggplant
Put 10 into NumberOfRetries
Put 0 into i
Repeat While i < NumberOfRetries
Try
Connect [ConnectionName]
Log ("Connect Ok")
Put i + NumberOfRetries into i
Catch
LogWarning ("Connect NG Try : " & i +1)
@akrnmd
akrnmd / GetDataFromXlsxFile.script
Last active October 3, 2020 00:02
Get Data From Xlsx File. #SenseTalk #eggplant
set ExcelFile to Workbook(ResourcePath("Data.xlsx"))
set ExcelSheet to ExcelFile.Wrksheet("Sheet1")
put ((Cell(ExcelSheet, "A1"),),) into MyCellA1
log MyCellA1
put ((ExcelSheet.Cell(1,2),),) into MyCellA2
log MyCellA2
@akrnmd
akrnmd / ReadTextByOCR.script
Last active October 3, 2020 00:01
Read Text By OCR. #SenseTalk #eggplant
Put ReadText("[ImageNameTopLeft]","[ImageNameBottomRight]") into MyText
log MyText