Post by AnkuLua on Oct 7, 2015 7:47:40 GMT
Because there are some drawbacks using Mobizen
1. hard to control the scree size and screen size too small
2. image quality is lossy
We strongly suggest you to use remoteAKL.
ankulua.boards.net/thread/74/remoteakl-tools-mirroring-device-pc
First step is not always easy.
Some AnkuLua users really have problem for their first waitClick.
As introduced in Script Development Tools, you can use Blue Stacks as a Android device.
If you prefer to use your own real device, you can try Mobizen. Here are the steps
Note: we will take calculator plus as example App. Please install it.
Step one: Install Mobizen on Android and PC
Android: play.google.com/store/apps/details?id=com.rsupport.mvagent
PC: download.mobizen.com/download/mobizen.exe
Then connect your device through USB or WiFi.
Mobizen will choose the best suitable screen size according to the connection condition.
Although it's easier to connect through WiFi, USB is more stable and reliable.
And we don't want Mobizen screen changing after restarting Mobizen. Therefore, suggest USB connection strongly.
Note: don't adjust Mobizen window size manually. Use the default window size.
Step two: Create directories and script file
On PC, create a directory as your project. Choose the name as you want.
Create another folder "image" under the project directory.
Then use your preferred editor to create a empty lua script.
Take the example of calculator_plus, the structure is
Step three: Setting Dimensions
Setting dimensions is the base of AnkuLua script.
For most cases, we just need to know the width of the android screen mirrored on mobizen.
Now use MWSnap, choose the icon "Window info"
Move the mouse to mobizen window. In the "Window info box", check the number after "Size(dx, dy)".
Here, the number is 900.
Now, back to the script, add Following lines
If you have navigation bar on the right, you should eliminate the width of the navigation bar.
Use MWSnap "Snap any area" to get the right resolution number.
Step Four: cropping images and adding waitClick
Click the MWSnap "Snap any area" button. Crop the button 9 of calculator plus. Save it as "9.png" in the image folder.
Back to the script, add waitClick("9.png"). Now the script is
Step Five: copy project to android and run the script on Android
Open the mobizen file browser by clicking the small down arrow on top of Mobizen window. Then click the folder icon as following
Then the file browser shown
Now drop and drop the project folder into it.
Step Six: Run it on Android
Get back to Android and select the just uploaded script and run it.
It should work as a charm.
If any problem, tell us.
1. hard to control the scree size and screen size too small
2. image quality is lossy
We strongly suggest you to use remoteAKL.
ankulua.boards.net/thread/74/remoteakl-tools-mirroring-device-pc
First step is not always easy.
Some AnkuLua users really have problem for their first waitClick.
As introduced in Script Development Tools, you can use Blue Stacks as a Android device.
If you prefer to use your own real device, you can try Mobizen. Here are the steps
Note: we will take calculator plus as example App. Please install it.
Step one: Install Mobizen on Android and PC
Android: play.google.com/store/apps/details?id=com.rsupport.mvagent
PC: download.mobizen.com/download/mobizen.exe
Then connect your device through USB or WiFi.
Mobizen will choose the best suitable screen size according to the connection condition.
Although it's easier to connect through WiFi, USB is more stable and reliable.
And we don't want Mobizen screen changing after restarting Mobizen. Therefore, suggest USB connection strongly.
Note: don't adjust Mobizen window size manually. Use the default window size.
Step two: Create directories and script file
On PC, create a directory as your project. Choose the name as you want.
Create another folder "image" under the project directory.
Then use your preferred editor to create a empty lua script.
Take the example of calculator_plus, the structure is
calculator_plus
|
|--- image
|
|--- example1.lua
Step three: Setting Dimensions
Setting dimensions is the base of AnkuLua script.
For most cases, we just need to know the width of the android screen mirrored on mobizen.
Now use MWSnap, choose the icon "Window info"
Move the mouse to mobizen window. In the "Window info box", check the number after "Size(dx, dy)".
Here, the number is 900.
Now, back to the script, add Following lines
-- ========== Settings ================
Settings:setCompareDimension(true, theWidthNumberFromYourMWSnap)
Settings:setScriptDimension(true, theWidthNumberFromYourMWSnap)
Change theWidthNumberFromYourMWSnap to what you get on your system.If you have navigation bar on the right, you should eliminate the width of the navigation bar.
Use MWSnap "Snap any area" to get the right resolution number.
Step Four: cropping images and adding waitClick
Click the MWSnap "Snap any area" button. Crop the button 9 of calculator plus. Save it as "9.png" in the image folder.
Back to the script, add waitClick("9.png"). Now the script is
-- ========== Settings ================
Settings:setCompareDimension(true, theWidthNumberFromYourMWSnap)
Settings:setScriptDimension(true, theWidthNumberFromYourMWSnap)
-- ========== main program ===========
waitClick("9.png")
Step Five: copy project to android and run the script on Android
Open the mobizen file browser by clicking the small down arrow on top of Mobizen window. Then click the folder icon as following
Then the file browser shown
Now drop and drop the project folder into it.
Step Six: Run it on Android
Get back to Android and select the just uploaded script and run it.
It should work as a charm.
If any problem, tell us.