Page 5 of 7

Re: [Script] WazeWrap

Posted: Tue Feb 19, 2019 12:52 am
by JustinS83
dBsooner wrote:Found an interesting z-index issue tonight. I can't seem to get the z-index high enough to be on-top of the UR Panel, but going to 10000 instead of 1000 gets above the turn restriction arrows. I found this by going directly to a UR in the URL (while I left my disabled turns enabled).

EDIT: Yep and I see a bug with URC-E too. LOL.
2019_02_18_18_34_55_Waze_Map_Editor.png
I wasn't going to mess with the zindex to get on top of that stuff but people won't stop pointing it out. So. FINE.

Re: [Script] WazeWrap

Posted: Mon Apr 29, 2019 9:09 pm
by JustinS83
Update released - 2019.04.29.02

Added an alerts interface - this provides replacements for alert, prompt, confirm and some additional messages.

One of the main purposes of this update is to eliminate the use of the blocking messages alert, prompt and confirm. This also adds some other message types that allow a script to convey some information, warnings or debug messages to the user.

Example:
This is an error from WME Place Interface Enhancements that was previously an alert box that is now displayed as an error message:

https://imgur.com/q0uyg5W.png

The message will time out in 6 seconds so you do not have to click anything to continue interacting with WME. If you messed the message, or just want to review previous messages, an alert history is provided. All info, warning, error and success messages are entered into the history when they are displayed.

All alerts will display at the top center of the WME window so they are clearly visible.

https://imgur.com/Xa5NrV5.png
The alert history is an orange box with a triangle and exclamation mark, that defaults in the top left corner. This is draggable to another location if you desire (although the list only expands down so do not move it to the bottom of the map). This will display all alerts in the current WME session, with the latest being on top.

The alerts are accessed via: WazeWrap.Alerts.

Code: Select all

WazeWrap.Alerts.info(GM_info.script.name, "message");
WazeWrap.Alerts.warning(GM_info.script.name, "message");
WazeWrap.Alerts.error(GM_info.script.name, "message");
WazeWrap.Alerts.success(GM_info.script.name, "message");
WazeWrap.Alerts.prompt(GM_info.script.name, "message", default_inputbox_text (can be blank), okFunctionCallback, cancelFunctionCallback);
WazeWrap.Alerts.confirm(GM_info.script.name, "message", okFunctionCallback, cancelFunctionCallback, ok_button_text (default is "Ok"), cancel_button_text (default is cancel));
WazeWrap.Alerts.debug(GM_info.script.name, "message");
info, warning, error and success prompts just accept the script name (which can be automatically pulled using GM_info.script.name) and the message you want to display.

prompt - this is a replacement for alert boxes. You pass the script name and your message, just like the other boxes. In addition to that you can pass default text to fill in the input box in the prompt; if you do not wish to, just pass an empty string. You then pass callback functions for if the user pressed the ok or cancel button. If you only want to handle one or the other, only pass that one and pass null for the other.

confirm works much the same as prompt in that you pass the callbacks for the ok and cancel buttons, but you can also customize the text of these buttons.

debug messages are more for script debugging and not for use to send to end users. These boxes will display larger (700px wide instead of 500px) and they will allow scrolling.

Examples of the other alert types:
https://imgur.com/1wXUux5.png

Re: [Script] WazeWrap

Posted: Tue Apr 30, 2019 1:11 am
by JustinS83
bz2012 wrote:We have the 'History' icon showing but it doesn't do anything when I click on it (except allow me to move it around).

Also WMEPH and WMEPH-beta have disappeared.
Obviously not the place to report WMEPH issues.

See the previous post about how history works.

Re: [Script] WazeWrap

Posted: Thu May 02, 2019 3:43 pm
by JustinS83
karlcr9911 wrote:Definitely need some better indication as to what this is via a tooltip, click-behavior to tell me what it is when no alerts are present...just something, so the daily (multiple times a day) questions in Discord will subside.

I love the concept but something more to let users know what script this is from, that nothing is actually wrong if no alerts are present, etc. would be most helpful in my opinion.

Thank you!
Yes, it is on my list. I've seen the confusion :)

Trying to make some changes to how the library loads so it doesn't fully load with every script that uses it so we don't have multiple versions floating around, elements loading 20+ times, etc.

Re: [Script] WazeWrap

Posted: Wed Jun 12, 2019 5:41 pm
by JustinS83
Update released! 2019.06.12.01

Features added: WW tab for WazeWrap settings.

https://imgur.com/BiePee9.png

WazeWrap settings (currently) includes two options: Editor PIN and Show alerts history.
Show alerts history is what it sounds like - when enabled the Script Alert History icon will be present on the map.

The Editor PIN is a value that you choose, and it should be protected (not shared) just like a password. When set, this allows scripts to be able to save your script settings to a server so you can have the same script settings across all computers that you work on. You enter the same PIN on all the PCs and they will use the settings retrieved from the WazeDev server. This PIN is what protects someone from reading/overwriting your settings so please do not share it (this is why it is hidden in the WW tab). Mousing over the eye icon will show you your PIN in case you forget it.

It is possible to change the PIN used on your local machine (Change PIN button that will appear after setting a PIN and refreshing your page). If you need to change/look up the PIN associated with your account you will need to contact me to do so.

Scripters

To use this feature you must be saving all of your settings into a single object that can be stringified.

To save and retrieve the settings from the server you use the following calls:

Code: Select all

WazeWrap.Remote.RetrieveSettings("Script Name");
WazeWrap.Remote.SaveSettings("Script Name", settingsObject);
The script name used must be unique and should never change. If you ever change this, the script settings already stored on the server will be orphaned and all your users will not be able to access them. Don't do this. Think of the users.

Both of these calls should be called using async/await since they are hitting a server, in order to preserve your program flow. You can use normal promise callbacks if you want...but why complicate your life?

How you implement using/saving the settings is completely up to you. I would recommend saving a lastSaved date/time in your settings object so you can compare local settings against the server settings so you know which one should be used.

If the user has not set a PIN or your script has not saved settings to the server before, the RetrieveSettings will return null. SaveSettings will return true/false depending on if the save was successful (will return null if the user has not set a PIN).

Re: [Script] WazeWrap

Posted: Wed Jun 12, 2019 8:42 pm
by JustinS83
DrivingWithBill wrote:This is helpful and starting to be able to use scripts on multiple devices.

Are the script settings cross platform compatible (OS and browser)? Can you elaborate on PIN number security is this viewable by others who manage the script? Is there a profile built on what scripts I am using? If I don’t create a PIN is there a central record?
Wut?

The PIN is only viewable to the editor via the WW tab on their local machine, and me if I were to log into my server and view each file for each user but that is saved by the user ID not the user name so I wouldn't have a way to track which ID is whom. As with any password/PIN, you shouldn't reuse a password/PIN that you use for anything else.

This is all voluntary; no one is forcing you to use it. I couldn't care less what scripts you are using and if you really think anyone cares (and what would they get out of it?) to build a profile of the scripts you are using then your tinfoil hat might be on a bit too tight :o

If you don't create a PIN the feature doesn't work (stated in the original post). I don't know what you mean by a central record.

Re: [Script] WazeWrap

Posted: Fri Jul 26, 2019 2:22 pm
by JustinS83
ehepner1977 wrote:As more scripts add the ability to store settings (thanks all of you) it occurred to me that I probably have a few scripts with different settings on my laptop and my desktop. So, the question I have is, does one set of values overwrite the other, or does WW only apply the saved settings on a brand new install of the script in question?
This is completely up to the individual scripts. WazeWrap just provides the ability to save/retrieve from the server, how that is actually done is up to the script itself.

Re: [Script] WazeWrap

Posted: Thu Oct 03, 2019 2:10 am
by JustinS83
GigaaG wrote:Can you add a function that returns housenumbers connected to selected streets?
Yes, I can. Won't be an immediate add, but I will add it to my list.

Re: [Script] WazeWrap

Posted: Thu Oct 03, 2019 2:30 am
by JustinS83
jm6087 wrote:
GigaaG wrote:Can you add a function that returns housenumbers connected to selected streets?
I don't think WazeWrap actually does any WME work, it is an aid for scripts.
It interacts with WME quite a bit, that's part of all the script help :)

Re: [Script] WazeWrap

Posted: Fri Nov 22, 2019 11:50 am
by JustinS83
Keihin wrote:Hi!

Am I correct when assuming this library is currently broken because of this change? viewtopic.php?f=819&t=294063
A couple of functions may be broken but 90%+ should still function