DROIDSCRIPT JAVASCRIPT EDITOR FAILS

338 views
Skip to first unread message

Nii Darko Darkoh

unread,
Jul 21, 2023, 8:36:24 AM7/21/23
to DroidScript
Hi all.
I need help to run my JavaScript EDITOR on my PC. After connecting to my device ie my infinix phone when I click on the play button, the connection brakes and tells me "no device is connected"

Soon afterwards I realize that my device is now showing a different IP address.

I run Windows 10 and 7
Also when I try to install on the windows 10, I get an http restricted page.

The version I have on the windows 7 pc tells me its no more supported. Can anyone help me guys? thanks.

Cemal

unread,
Jul 29, 2023, 5:22:29 AM7/29/23
to DroidScript
Hi,

Have you tried in different browsers Chrome, Firefox.

Dave

unread,
Jul 29, 2023, 5:40:50 AM7/29/23
to DroidScript
Last time I saw that issue, it was because the WiFi IDE was not extracted properly.

Try deleting the hidden .edit folder in your DroidScript folder and restarting DS (it will re-extract the .edit folder)

Also, I would recommend Chrome or Edge for use with DS. (Edge is based on Chrome)

Nii Darko Darkoh

unread,
Jul 31, 2023, 4:23:51 PM7/31/23
to DroidScript
Hi guys,
Thanks for your response,
I have tried your suggestions and have the following concerns:
1. I cant find the .edit file in my Droidscript folder
2. I am using Chrome and have tried EDGE. It think it boils down to the .edit file.. but that is also absent in my folder.
Still counting on your help guys.
Thanks

Steve Garman

unread,
Jul 31, 2023, 10:46:13 PM7/31/23
to DroidScript
There is something we are missing
Can you install and run the attached spk and post the result here please
temp66.spk

Nii Darko Darkoh

unread,
Aug 2, 2023, 5:08:44 AM8/2/23
to DroidScript
/*
os=Android 8.1 (Oreo)  API level 27
Apk Builder version 2.57
tablet=false
model=Infinix X650
isChrome=false
isTV=false
DroidScript=2.61.0
Storage access=Traditional
screen width=720
screen height=1504
screen density=320
display width=720
display height=1432
internal folder=/sdcard
external folder=
int free space=14.482807
ext free space=NaN
memory=2,017,193,984
premium=true
country code=US
country=United States
language code=en
language=English
wifi=10.57.135.3
userAgent='Mozilla/5.0 (Linux; Android 8.1.0; Infinix X650 Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/115.0.5790.138 Mobile Safari/537.36'
.edit/app.js size=155607

this app updated 2023-08-01T02:28:07.368Z
*/

Steve Garman

unread,
Aug 2, 2023, 11:22:42 AM8/2/23
to DroidScript
ok so the line in that code
 var t66=app.GetFileSize("/StorageDroidScript/.edit/app.js")
is checking the size of a fileinside the .edit folder so we know the folder is definitely ther because it returns
155607

from some of the rest of the code we can see that you are not using scoped storage which makes life easier I love that world Traditional 

my guess is that you are looking for the folder using a file explorer set not show hidden files (files whose name starts with a dot)

rather than provide you with code to delete the .edit folder I would prefer you to look at your file explorer and see if it has a setting to "show hidden files"

Try that and get back to us if you're still stuck with deleting the .edit folder

Message has been deleted

Nii Darko Darkoh

unread,
Aug 3, 2023, 7:58:51 AM8/3/23
to DroidScript
Currently I have the Files by Google app.. but it does not enable me to hide or  unhide files.
Message has been deleted

Nii Darko Darkoh

unread,
Aug 3, 2023, 9:54:35 AM8/3/23
to DroidScript


Hi,
I have installed ES FileManager and can now see the hidden files. I can see the .Edit folder now.
What is the next step @Steve Please?
-Nii

Steve Garman

unread,
Aug 3, 2023, 10:59:54 AM8/3/23
to DroidScript
// gou can run this code in a new app to delete it
// then restart DroidScript
"use strict"
var dotedit = "/Storage/DroidScript/.edit"
var testfile = dotedit + "/app.js"

function OnStart()
{
   var lay = app.CreateLayout("linear", "VCenter, FillXY")
   var btn = app.AddButton(lay, "delete .edit")
   btn.SetOnTouch(btn_OnTouch)
   btn.SetEnabled(false)
   app.AddLayout(lay)
      //
   var len = app.GetFileSize(testfile)
   if(len > 10) btn.SetEnabled(true)
   else btn.SetText("already deleted")
}

function btn_OnTouch()
{
   if(app.FolderExists(dotedit))
   {
      app.DeleteFolder(dotedit)
      var dunnit =
         app.FolderExists(dotedit) ?
         "failed" : "Now shut down DroidScript and restart"
      app.Quit(dunnit)
   }
}

Steve Garman

unread,
Aug 3, 2023, 11:04:32 AM8/3/23
to DroidScript
Thanks to Cemal for checking my work and pointing out I was making too big a deal of deleting the folder

Nii Darko Darkoh

unread,
Aug 4, 2023, 6:09:18 AM8/4/23
to DroidScript
Hi Steve,
I have tried your code but the situation still persists.
I am beginning to suspect my phone's power (mostly low) and my router (drops a number of times) 
Will work on these and revert with my report.
Thanks guys. 

Nii Darko Darkoh

unread,
Aug 4, 2023, 6:20:19 AM8/4/23
to DroidScript
Hi,
I want to know the steps to get the Droidscript extension in my Chrome browser.
Any help please?
Thanks all.

Steve Garman

unread,
Aug 4, 2023, 9:55:39 AM8/4/23
to DroidScript
When you ran mycodedid you get a message at the end telling you to restart DroidScript
or did the message just say "failed"?

When you restarted DroidScript did you get a message that it was extracting files?

Steve Garman

unread,
Aug 4, 2023, 11:46:18 AM8/4/23
to DroidScript
I would appreciate an answer to my question above
But then I ld like to run you through how I connect to my browser and ask you when your experience starts to diverge from mine

These are the instructions I follow:

On your phone start DroidScript

At the top of the screen press the WiFi button (second from left)

Tbe WiFi button turns green and a message comes up around the middle of the phone screen
"To edit apps using your PC, type the following address into your browser's address bar"
   192.168.1.34:8088

Your numbers may be different but they will end :8088

Leave that message on the phone screen.

----------------------

Now go to your browser on the PC and type the numbers from the screen

It may take a minute or so to settle down

(If Twitter X pops up in another tab ignore it and go back to the tab you were using)

Show the debug log by pressing the top right button
(itsa triangle with ! in it)

On the left of the screen press the button whose icon is 9 squares to show the app selector

Click one of your apps you recognize to open its code

Immediately above the code there are 6 buttons
The fifth is a run button (right facing arrow)
Click it to run your code

The code will start to run and messages should appear on the debug log you opened earlier

----------------------

Your phone screen will change to show your app running
You should be able to interact with it as normal on the phone

Nii Darko Darkoh

unread,
Aug 4, 2023, 1:54:33 PM8/4/23
to DroidScript
Absolutely, I got a Restart Droidscript message and an Extracting Files effect on my phone

Steve Garman

unread,
Aug 4, 2023, 2:36:55 PM8/4/23
to DroidScript
Good
And you've got plenty of space so it should have all extracted properly 
Try to follow my instructions exactly rather than rushing ahead

There's still something we haven't noticed I'm guessing 

Nii Darko Darkoh

unread,
Aug 4, 2023, 5:36:33 PM8/4/23
to DroidScript
This is where I diverted from you ..


" Now go to your browser on the PC and type the numbers from the screen"

All along I have been using the Extension app in Chrome..

Its been a while since I used the browser interface..

Man, the browser  interface is excellent.. Its working Steve..

Note: The Chrome Extension comes among a pack of other extensions that are marked as deprecated so that explains it.

I think I an good this far. 
Thanks Steve and all you guys. Thanks.

-Nii

Nii Darko Darkoh

unread,
Aug 4, 2023, 6:04:43 PM8/4/23
to DroidScript
The browser interface is better so far..
I need a way to show values in the debug window. Forgotten the command.
Any help please?

Steve Garman

unread,
Aug 4, 2023, 7:02:49 PM8/4/23
to DroidScript

In your code you can use 
console.log 
to display in the debug window, for example
console.log( edt.GetText())

Steve Garman

unread,
Aug 4, 2023, 7:13:51 PM8/4/23
to DroidScript
If in your code you have a global variable myVal
you can check its current value directly while your code is running 
In the input box at the  bottom of the debug log type

?myVar

 
Reply all
Reply to author
Forward
0 new messages