Martin Larsen Active Member Licensed User Longtime User Jul 5, 2021 #1 Is it possible to somehow add the current date and time to comment links? Like below: B4X: Copy 'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project_%date%_%time%.zip
Is it possible to somehow add the current date and time to comment links? Like below: B4X: Copy 'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project_%date%_%time%.zip
DonManfred Expert Licensed User Longtime User Jul 5, 2021 #2 Martin Larsen said: Is it possible to somehow add the current date and time to comment links? Like below: Click to expand... Notes Spaces should be replaced with +. The parameters values are url decoded. The ide://run method supports these additional arguments: FilesSync=True - Causes the IDE to sync the Files folder after operation completes. CleanProject=True - Causes the IDE to clean the project after operation completes. VMArgs - Similar to Args but added as a JVM argument. You can add: VMArgs=-DZeroSharedFiles%3DTrue to a zipper call to delete the content of the platform specific copies of shared files (the content will be added back when the program runs, because of the custom build action). The parameter values can include the following case sensitive aliases: %B4X% - installation folder. %PROJECT% - project folder (location of the project .B4? file). %JAVABIN% - configured java bin folder (not available in beta #1) %ADDITIONAL% - Platform specific additional libraries folder. Any other environment variable Setup an ENV Var with the Date you want to use. Use this ENV Var then. Upvote 0
Martin Larsen said: Is it possible to somehow add the current date and time to comment links? Like below: Click to expand... Notes Spaces should be replaced with +. The parameters values are url decoded. The ide://run method supports these additional arguments: FilesSync=True - Causes the IDE to sync the Files folder after operation completes. CleanProject=True - Causes the IDE to clean the project after operation completes. VMArgs - Similar to Args but added as a JVM argument. You can add: VMArgs=-DZeroSharedFiles%3DTrue to a zipper call to delete the content of the platform specific copies of shared files (the content will be added back when the program runs, because of the custom build action). The parameter values can include the following case sensitive aliases: %B4X% - installation folder. %PROJECT% - project folder (location of the project .B4? file). %JAVABIN% - configured java bin folder (not available in beta #1) %ADDITIONAL% - Platform specific additional libraries folder. Any other environment variable Setup an ENV Var with the Date you want to use. Use this ENV Var then.
Martin Larsen Active Member Licensed User Longtime User Jul 5, 2021 #3 Well, I did notice that, but to my knowledge there are no environment variables for date and time. Or are there? Upvote 0
Well, I did notice that, but to my knowledge there are no environment variables for date and time. Or are there?
Martin Larsen Active Member Licensed User Longtime User Jul 5, 2021 #4 DonManfred said: Setup an ENV Var with the Date you want to use. Use this ENV Var then. Click to expand... This sort of contradicts the use case. I want it to change the file name according to the current time. If I setup an ENV var, I could just as well hardcode the time etc Upvote 0
DonManfred said: Setup an ENV Var with the Date you want to use. Use this ENV Var then. Click to expand... This sort of contradicts the use case. I want it to change the file name according to the current time. If I setup an ENV var, I could just as well hardcode the time etc
DonManfred Expert Licensed User Longtime User Jul 5, 2021 #5 Windows Environment Variables - Windows CMD ss64.com Use DATE and TIME? Upvote 0
Martin Larsen Active Member Licensed User Longtime User Jul 5, 2021 #6 DonManfred said: Windows Environment Variables - Windows CMD - SS64.com Use DATE and TIME? Click to expand... I didn't know about %DATE% and %TIME%! I tried but the resulting filename simply includes the %DATE% string literally, eg. Project_%DATE%.zip. However, it works in the terminal: B4X: Copy echo %DATE%_%TIME% 05-07-2021_13:25:05,16 Upvote 0
DonManfred said: Windows Environment Variables - Windows CMD - SS64.com Use DATE and TIME? Click to expand... I didn't know about %DATE% and %TIME%! I tried but the resulting filename simply includes the %DATE% string literally, eg. Project_%DATE%.zip. However, it works in the terminal: B4X: Copy echo %DATE%_%TIME% 05-07-2021_13:25:05,16
LucaMs Expert Licensed User Longtime User Jul 5, 2021 #7 DonManfred said: Any other environment variable Click to expand... I think that sentence refers to B4X environments, not system ones. These: DonManfred said: The parameter values can include the following case sensitive aliases: %B4X% - installation folder. %PROJECT% - project folder (location of the project .B4? file). %JAVABIN% - configured java bin folder (not available in beta #1) %ADDITIONAL% - Platform specific additional libraries folder. Click to expand... are not system environment variables. Upvote 0
DonManfred said: Any other environment variable Click to expand... I think that sentence refers to B4X environments, not system ones. These: DonManfred said: The parameter values can include the following case sensitive aliases: %B4X% - installation folder. %PROJECT% - project folder (location of the project .B4? file). %JAVABIN% - configured java bin folder (not available in beta #1) %ADDITIONAL% - Platform specific additional libraries folder. Click to expand... are not system environment variables.
Martin Larsen Active Member Licensed User Longtime User Jul 5, 2021 #8 LucaMs said: are not system environment variables. Click to expand... No, but then Erel writes "Any other environment variable". It is not clear whether or not it is system variables, but I think so. Upvote 0
LucaMs said: are not system environment variables. Click to expand... No, but then Erel writes "Any other environment variable". It is not clear whether or not it is system variables, but I think so.
LucaMs Expert Licensed User Longtime User Jul 5, 2021 #9 Martin Larsen said: No, but then Erel writes "Any other environment variable". It is not clear whether or not it is system variables, but I think so. Click to expand... It is "clear" if you read the 4 variables listed, which are not Windows but they are evidently recognized by the B4X IDEs. Upvote 0
Martin Larsen said: No, but then Erel writes "Any other environment variable". It is not clear whether or not it is system variables, but I think so. Click to expand... It is "clear" if you read the 4 variables listed, which are not Windows but they are evidently recognized by the B4X IDEs.
Martin Larsen Active Member Licensed User Longtime User Jul 5, 2021 #10 I really don't think it is clear, given that apparently there are no other B4X environment variables documented anywhere. Only Erel knows PS. And the fact that two of us understand it as system variables proofs that it is not that clear! Upvote 0
I really don't think it is clear, given that apparently there are no other B4X environment variables documented anywhere. Only Erel knows PS. And the fact that two of us understand it as system variables proofs that it is not that clear!
LucaMs Expert Licensed User Longtime User Jul 5, 2021 #11 Martin Larsen said: I really don't think it is clear, given that apparently there are no other B4X environment variables documented anywhere. Only Erel knows PS. And the fact that two of us understand it as system variables proofs that it is not that clear! Click to expand... I vaguely remember some posts... let's see if I can find them... https://www.b4x.com/android/forum/t...t-zip-name-at-loading-time.127037/post-795235 (Read also the previous and next posts) Upvote 0
Martin Larsen said: I really don't think it is clear, given that apparently there are no other B4X environment variables documented anywhere. Only Erel knows PS. And the fact that two of us understand it as system variables proofs that it is not that clear! Click to expand... I vaguely remember some posts... let's see if I can find them... https://www.b4x.com/android/forum/t...t-zip-name-at-loading-time.127037/post-795235 (Read also the previous and next posts)
Martin Larsen Active Member Licensed User Longtime User Jul 5, 2021 #12 It doesn't really makes it clearer to me Erel said: The current placeholders are: PROJECT, ADDITIONAL (additional libraries folder), B4X (installation folder) and all the environmental variables. Click to expand... All the environmental variables? Which environment variables if not system variables? I think the statement makes most sense with system vars included. Upvote 0
It doesn't really makes it clearer to me Erel said: The current placeholders are: PROJECT, ADDITIONAL (additional libraries folder), B4X (installation folder) and all the environmental variables. Click to expand... All the environmental variables? Which environment variables if not system variables? I think the statement makes most sense with system vars included.
Martin Larsen Active Member Licensed User Longtime User Jul 5, 2021 #13 It is system environment variables!!! Proof: B4X: Copy 'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project_%COMPUTERNAME%.zip Works! But not DATE and TIME, for some reason. Upvote 0
It is system environment variables!!! Proof: B4X: Copy 'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project_%COMPUTERNAME%.zip Works! But not DATE and TIME, for some reason.
agraham Expert Licensed User Longtime User Jul 5, 2021 #14 Martin Larsen said: But not DATE and TIME, for some reason. Click to expand... I think it is because they are not 'real' environment variables but are 'virtual' ones recognised by the shell but not actually existing in the environment variable table. Upvote 0
Martin Larsen said: But not DATE and TIME, for some reason. Click to expand... I think it is because they are not 'real' environment variables but are 'virtual' ones recognised by the shell but not actually existing in the environment variable table.
LucaMs Expert Licensed User Longtime User Jul 5, 2021 #15 agraham said: I think it is because they are not 'real' environment variables but are 'virtual' ones recognised by the shell but not actually existing in the environment variable table. Click to expand... Martin Larsen said: It is system environment variables!!! Click to expand... Well, they seem to be a "mix" of system & B4X/IDE environment variables, since not even %B4X% is a "real Windows (!) variable". Upvote 0
agraham said: I think it is because they are not 'real' environment variables but are 'virtual' ones recognised by the shell but not actually existing in the environment variable table. Click to expand... Martin Larsen said: It is system environment variables!!! Click to expand... Well, they seem to be a "mix" of system & B4X/IDE environment variables, since not even %B4X% is a "real Windows (!) variable".
Erel B4X founder Staff member Licensed User Longtime User Jul 5, 2021 #16 Zipper is a B4J program. Source is attached. It is very simple to change it to set the filename based on the current date and time. Attachments Zipper.zip Zipper.zip 1.8 KB · Views: 755 Upvote 0
Zipper is a B4J program. Source is attached. It is very simple to change it to set the filename based on the current date and time.
Lucas Siqueira Active Member Licensed User Longtime User Dec 10, 2023 #17 I modified Ziper to have the %B4XDATETIME% function that displays date and time in the format _yyyyMMdd_HHmmss yyyy=year, MM=month, dd=day, HH=hour, mm=minute and ss=second Exemple in use: 'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=%PROJECT_NAME%_%B4XDATETIME%.zip Copy the Zipper.jar file to the IDE folder (B4A, B4I, B4J). Exemple: C:\B4X\IDE\B4A Attachments B4XPagesZipperModified.zip B4XPagesZipperModified.zip 4.9 KB · Views: 430 Zipper.jar Zipper.jar 173.6 KB · Views: 419 Upvote 0
I modified Ziper to have the %B4XDATETIME% function that displays date and time in the format _yyyyMMdd_HHmmss yyyy=year, MM=month, dd=day, HH=hour, mm=minute and ss=second Exemple in use: 'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=%PROJECT_NAME%_%B4XDATETIME%.zip Copy the Zipper.jar file to the IDE folder (B4A, B4I, B4J). Exemple: C:\B4X\IDE\B4A