How to create a dashboard using excel and .bat file - java

I would like to ask the community if there is any way to create a GUI menu where the options will populate itself based on number of files that are saved in a folder directory. The user will then have two options whereby he can choose to generate a status or a dashboard option. After he chooses the report that he wish to generate, another menu will appear to ask him which document he want to select. This is where the menu would check the folder and generate the options based on number of files in the folder. For example, there could be doc1 and doc2 in the folder. Then the menu will generate 2 options. 1. Select doc1. 2. Select doc2. Then after the user inserted another doc3 into the folder. The menu will add another 3. Select doc3 without having the user to change the code. Is there a way to do this? Thanks.

This makes no sense. A .bat file is by definition something that does not have a GUI.
Also you really have provided the vaguest information for something seemingly large, and there appears to be no reason why you've also tagged this as excel and exe.

Since your .bat file could launch a particular Excel file, you could go that way, putting all the dashboard info in the spreadsheet. Would require some VBA code to make it as interactive as it sounds like you want, but that's entirely possible.
I'm not aware of any way that a .bat file can create a GUI on its own, although I may be missing something. Since the .bat file can run almost anything, it can be a starting point, but the heavy lifting would be done in something else.
Another approach would be to look at AutoHotkey, which can give you a GUI and a fair bit of processing power & interactivity all within the one script. The URL is http://www.autohotkey.com/ and that site has a tremendous amount of examples and help available. Also some AHK questions here on Stack Overflow from time to time.
Either way you go, it's a fairly large project. Good luck!

Related

Publish updatable Java software through Wordpress

I have just written a Java program that I now need to publish. I want to make the software easily updatable, and I therefore need your advice. The program will be used by people with minimal technical knowledge, hence usability is absolute key. The program is not open source.
The situation is this:
First time users download a zip-file containing one .jar-file and two folders that should contain the program output files (.xml-files and .png-files). I want to make it as easy as possible for the user to update the .jar (replace it with another .jar, not necessarily at run time). To my help I have a simple web-based Wordpress site that the user will view as the source of the program.
I'll list the possible solutions I've come up with:
1 (fallback solution). The user have to manually go to the Wordpress site where I'll put a separate direct download link (from Google Drive) for the .jar-file. The user then has to manually replace the .jar in the existing folder with the new one.The drawback to this is that it requires too much work from the user, and they program probably won't get updated very often.
2. Alongside the Program.jar in the zip-file the first user downloads, I place another Program-Updater.jar. This new .jar's sole purpose is to, when the user opens it, download a new version of Program.jar from the web and replace the existing one.This is better than the previous option because it requires less work, even though it's not automatic. The drawback is that I need one more .jar which can confuse the user, and most importantly I have no way of updating the Program-Updater.jar.
3. Java Web Start.I've tried reading up on how this works, but I'm wondering if there is a way to get it to work. One possible problem is that I can't really access the host, and to be able to set up the .jnlp the correct way I think you need this. I'm also wondering how the program's file structure would be (is the .jar even placed on the user's computer?) and if this could confuse the user. Also how to make it always work offline.
4. Suggest your own solution!
Any input on this matter would be greatly appreciated, and I'll gladly give more info than I already have.
Cheers
Getdown was the way to go; it is extremely easy to use.
I'll put the .zip on Google Drive with a direct download link to it on my Wordpress site.
The files used by getdown are placed in and downloaded from my public git repo.

Open PDF to a specific page

Is there a way to go to open a specific PDF-page with Java?
It can either open the page in Adobe Reader or a built in reader in Java.
I have the file path and the file saved locally.
It looks like you have a couple of options here.
The easiest way to do this on Windows would be using the command line. Both Acrobat and Reader take command line arguments such as zoom level and starting page. The command to open a document on a specific page on Windows looks like this:
Acrobat.exe /A "page=1000" "C:\example.pdf"
And here is a reference of all the parameters Acrobat and Reader take on Windows - Parameters for Opening PDF Files.
On Mac, things get a bit tricky. Neither Acrobat nor Reader take command line parameters there. However, you still have some options on the Mac. Your best option would be to use AppleScript. Acrobat has extensive support for it, it's fairly easy to get started, and you can even import the AcrobatLibrary and see a list of available API. Here is a good article to get you started on this. As with Windows, it looks like this is both available for Acrobat and Reader.
I've put together a small script that should open a document and then go to a specific page.
tell application "Adobe Acrobat Pro"
tell PDF Window 1
goto page 3
end tell
end tell
Here is a good way to open the newly created AppleScript from Java.
You can add a "go-to" PDF action to the document's "open" viewer application event. Here is how you do it with our company product PDFOne (for Java). You might be able to do the same with other PDF libraries.
http://www.gnostice.com/nl_article.asp?id=217&t=Trouble_free_Linking_To_PDF_Pages_Online
Sample PDF: http://www.gnostice.com/newsletters/downloads/2011_03/PDF_that_skips_to_page_3_by_default.pdf
I think this is what you are asking for...
Say you have a document that has several pages of minutia at the beginning (perhaps a bunch of legalese that you’re not going to read the first time, much less every time). Rather than scrolling past all that minutia every time, you want it to go straight to the table of contents so you can find what you’re looking for more quickly.
If that sounds similar to what you are wanting, then here you go…
(By the way, I’m using Adobe Acrobat Pro. I don’t know if this will work for Reader.)
Open the document in Adobe.
Click Enable All Features.
Click File.
Click Properties.
Click on the tab called Initial View.
Find where it says “Open to page” and enter the page number you want it to open to.
Click OK.
Save the file.
Close the file.
Reopen the file. (It should open to the page you set.)

Android configuration setup application politics

I have made an android app and I have some .csv files with initial data. Can anyone suggest a proper way to do that? For example, someone could say "just create a folder and put them inside" but I want a better way like a setup that I can do with windows (e.g. installshield but no so advanced ).
You can make with wizard forms. In first window choose .csv file, in second window
match the fileds of .csv file with database fildes and finally upload data.

Saves game level settings

I have been coding for about a month and I have found ways to adapt around ever problem but one. The problem as you can probably see by the title is how to make a way to make game saves. I am currently creating a very simple game that has about 5 classes of my code and maybe 2 of Java Swing GUI.
I know how I would like to go about the saving process but I have no idea how to do it in my code. How I would like to go about doing this is by making the code print a Number or Integer to a file to represent a Level. For example if you completed level 1 the number in the file would be 1. I have tried some templates for this but none of them work.
I understand how to write to a file but my problem is reading it from a jar or even creating a file then reading it from a place on the computer. I need to know how to find a file URL for different computers because some use Docs and Settings and other Users. Please could someone help.
Since the jar is read only, it can only contain the 'default settings'. See this answer for the general strategy to deal with such a embedded-resource.
Speaking of which (embedded resources) see the info. page for more details on how to access them.
Here is an example of storing and reading a Properties file from the 'current directory'.
As mentioned by #MadProgrammer though, it is safest to put the settings file into a (sub-directory) of user.home, as seen in this answer.
But a properties file is just one option. You might also serialize an object, or write the file in a custom format that your app. knows how to read, for the first two off the top of my head.
Besides 'serialize (in some form) in a File', there is also the Preferences API, or for desktop applications launched using Java Web Start, the PersistenceService. Here is a demo. of the service.
I need to know how to find a file url for different computers because
some use Docs and Settings and other Users
The System property user.home points to the user's home directory
File userHome = new File(System.getProperty("user.home"));

Navigating a website and uploading a PDF using a submit button using JAVA

To explain my situation, I currently have a large amount of PDFs (In the hundreds). Each PDF has a name associated with it and I need browse an external website my job uses to manage their files manually, clicking a button to "attach file" every time and manually selecting the file to upload to the site. If this sounds incredibly inefficient that's because it is, and doing this takes hours to finish while more of them pile up.
I already know how to deal with files, moving them around on a computer, and modifying them using JAVA, but I haven't done anything related to interacting with websites so I wouldn't know where to start.
I'll need to be able to perform the following actions or actions similar in order to complete what I have in mind.
General browsing of a website
Navigating through the website using
links provided by buttons on the page
Being able to click buttons.
Reading Strings present on the screen in order to compare names (Under a certain section there is a list of peoples names. If I detect that there are multiple people with the same name I want to skip the file and deal with it manually)
Clicking a button which brings up an upload menu and selecting a file to upload to it, or any other way of interacting with a feature such as this. (Like when you click Computer on IMGUR and it asks you to choose an image you would like to upload)
I'm not asking for anyone to straight up give me the answer I'm looking for (Though I'm not opposed if you are aware of how to do things such as these and would like to share.) but any guidance on where to find information on performing such actions would be helpful. I've already been searching and will be continuing to search for relevant information.
Thank you for any help you may be able to give.
It appears you want to automate some manual steps on a browser. You can take a look at Selenium WebDriver.

Categories

Resources