Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation

kin arima akrnmd

🌴
On vacation
View GitHub Profile
@akrnmd
akrnmd / SpecifyTheDragAndDropPointByScreenRatio.script
Last active Oct 3, 2020
Specify The Drag and Drop (Swipe) Point By Screen Ratio. #SenseTalk #eggplant
View SpecifyTheDragAndDropPointByScreenRatio.script
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 / Proc_L1ConnectionController.py
Last active Oct 9, 2020
Connect/Disconnect All L1 Routes. #python #orchestrationscript #CloudShell
View Proc_L1ConnectionController.py
import cloudshell.helpers.scripts.cloudshell_scripts_helpers as helpers
# How to use this file
#
# from Proc_L1ConnectionController import L1ConnectionController
# L1CC = L1ConnectionController()
# L1CC.ChangeStateOfAllL1Routes("Connect")
class L1ConnectionController:
def __init__(self):
self.reservation_id = helpers.get_reservation_context_details().id
self.session = helpers.get_api_session()
@akrnmd
akrnmd / CaptureAndCompareTwoImages.script
Last active Oct 3, 2020
Capture and compare two images. #SenseTalk #eggplant
View CaptureAndCompareTwoImages.script
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 / UseUserInputData.script
Last active Oct 3, 2020
Use User Input Data. #SenseTalk #eggplant
View UseUserInputData.script
ask "Enter your name:"
log it
@akrnmd
akrnmd / UseGherkinSample.script
Last active Oct 3, 2020
UseGherkinSample. #SenseTalk #eggplant
View UseGherkinSample.script
(* 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 / ReadTheMatrix.script
Last active Oct 3, 2020
Read The Matrix. #SenseTalk #eggplant
View ReadTheMatrix.script
Put Imagelocation("X-ImageName").x into LocationX
Put Imagelocation("Y-ImageName").y into LocationY
Log ReadText(LocationX, LocationY)
@akrnmd
akrnmd / UseArray.script
Last active Oct 3, 2020
Use Array. #SenseTalk #eggplant
View UseArray.script
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 Oct 3, 2020
Offset arbitrary values from the hot spot of the original image. #SenseTalk #eggplant
View ImageOffset.script
Click "[ImageName]"
Click "[ImageName]" + (0,-30) --(x, y)
@akrnmd
akrnmd / TryXTimes.script
Last active Oct 2, 2020
Try X Times. #SenseTalk #eggplant
View TryXTimes.script
repeat 3 times
try
[YourAction]
exit repeat
end try
end repeat
@akrnmd
akrnmd / SortTheList.script
Last active Oct 2, 2020
Sort The List. #SenseTalk #eggplant
View SortTheList.script
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
You can’t perform that action at this time.