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 / UseArray.script
Last active October 3, 2020 00:00
Use Array. #SenseTalk #eggplant
put "ABC,DEF,GHI"&return&"GHI,DEF,ABC" into array
put item 2 of line 1 of array & item 2 of line 2 of array into A
answer A -- "DEFDEF" Is displayed
@akrnmd
akrnmd / ImageOffset.script
Last active October 3, 2020 00:00
Offset arbitrary values from the hot spot of the original image. #SenseTalk #eggplant
Click "[ImageName]"
Click "[ImageName]" + (0,-30) --(x, y)
@akrnmd
akrnmd / TryXTimes.script
Last active October 2, 2020 23:59
Try X Times. #SenseTalk #eggplant
repeat 3 times
try
[YourAction]
exit repeat
end try
end repeat
@akrnmd
akrnmd / SortTheList.script
Last active October 2, 2020 23:59
Sort The List. #SenseTalk #eggplant
put (5,4,2,3,1) into MyList
log MyList
sort descending MyList
log MyList --5,4,3,2,1
sort ascending MyList
log MyList --1,2,3,4,5
@akrnmd
akrnmd / MultiImageSearchAndClick.script
Last active October 3, 2020 00:01
Multi Image Search And Click. #SenseTalk #eggplant
put EveryImageLocation("[TargetImage]") into MyImageList
log MyImageList
//If the [TargetImage] is a collection, sorting may be necessary
sort MyImageList
//Click Selected Image
Click item 1 of MyImageList
@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
@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 / 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 / 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 / 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