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 / 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 / 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 / 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 / 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 / ReadTheMatrix.script
Last active October 3, 2020 00:00
Read The Matrix. #SenseTalk #eggplant
Put Imagelocation("X-ImageName").x into LocationX
Put Imagelocation("Y-ImageName").y into LocationY
Log ReadText(LocationX, LocationY)
@akrnmd
akrnmd / UseGherkinSample.script
Last active October 3, 2020 00:00
UseGherkinSample. #SenseTalk #eggplant
(* add to file of "UseGherkinSample.feature" *)
//Feature: Get Screen Capture
// Scenario: Get Screen Capture
// Given connect "localhost"
// When get screenshot
// Then disconnect "localhost"
(* UseGherkinSample.script *)
to handle connect_STR
params str1
@akrnmd
akrnmd / UseUserInputData.script
Last active October 3, 2020 00:01
Use User Input Data. #SenseTalk #eggplant
ask "Enter your name:"
log it
@akrnmd
akrnmd / CaptureAndCompareTwoImages.script
Last active October 3, 2020 00:01
Capture and compare two images. #SenseTalk #eggplant
set CaptureArea to (0, 0, 100, 100) -- Set Capture Area.
CaptureScreen "C:\Users\[UserName]\Image-Before.png", CaptureArea
//Your Actions
CaptureScreen "C:\Users\[UserName]\Image-After.png", CaptureArea
if file "C:\Users\[UserName]\Image-Before.png" as data is equal to file "C:\Users\[UserName]\Image-After.png" as data then
log "Image-Before and Image-After are same images."
@akrnmd
akrnmd / SpecifyTheDragAndDropPointByScreenRatio.script
Last active October 3, 2020 00:01
Specify The Drag and Drop (Swipe) Point By Screen Ratio. #SenseTalk #eggplant
drag (remotescreensize().x*0.5,remotescreensize().y-1)
wait 1
moveto (remotescreensize()*0.5)
wait 1
drag (remotescreensize().x,remotescreensize().y*0.5)
drop
wait 10
typetext homebutton
@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