Is there a way to make a vbs script that counts days? [closed] - javascript

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to make a program with vbs, when opened it has a pop up message that says to do something. I have the program in my startup folder on my computer so it pops up every time i turn on my computer. The problem is if I miss a day then it wont say that. So i was wondering if there was a way where I could have a variable that is set so that every day it adds +1 to the variable and then in the message it says (Example, "You have not clicked OK in '2' days"). This way I can keep track of how many days I have missed and then it is a message box in vbs so there would be an 'ok' and 'cancel' option, so would it be possible to make it so when i select 'ok' then it would reset the variable to 0 again?
If this is possible could someone help me out with the code? Or if it can be done with PowerShell or javascript instead post that code instead please?
Thank You!
P.S: Yes I have googled it and tried figuring out how to do it, for almost 2 hours. Asking on forms is ALWAYS my last resort.

Ok I guess I asked too much and I realize that, sorry. I can figure out the variables and im some what familiar with the rest except one part, how do I get the script to keep track of days, as in add +1 to a variable every day the 'OK' button is not pressed?

Related

Program that would click repeatedly on a website button [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 days ago.
Improve this question
I need to get a ticket online on a website which online provides tickets once every 1000000 years. I've read that some people got tickets by clicking randomly several times at a random hour.
I was thinking of creating a little program, which would click on the "get a ticket" button, and if it's taken to the "no available" page, would start again by clicking on the "Ok" button, and then again "get a ticket". But if it's taken to the purchase page, would stay there.
I don't know where to start, I guess I could use python, javascript, or C? but I don't really know how. If you have some ideas, I would google everything, but I just need the root, if that makes sense.
Thank you in advance! :)
I havent tried anything yet

Simple Questions/Answer Games [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Thank you for taking the time reading this!
A quick disclaimer, I have never coded anything in my life!
I know some basics terms so you can communicate your response without defining them.
Anyways, my project is a simple game.
You press [START]
You hear a "random" word
You have a type-in box,
if you fill it right you get +5 points and get a random word .... and so on.
You fill it wrong, you lose immediately [gameover]
Although, I would deeply appreciate to code the whole game, for some of you it is relatively simple - I wish to do it myself for the learning experience and sense of accomplishment!
For now, I only need a push in the right direction.
I aim to use it on my tablet or phone (both run android)
Best,
haz
You should start by learning the fundamentals of JavaScript and HTML (should also learn CSS if you want the app to look nice). There are many sites (other than SO) that have multiple tutorials and/or full documentation (i.e. MDN, W3Schools). You could also use online teaching platforms for that.
Here are a couple of things you should consider after getting a grasp of the basic concepts:
When do you want to check if the user inserted the right input (timer, on enter, a submit button)?
Where will the sounds be stored and how will you retrieve them (a collection of sounds of files, a database with a server, a single big sound file containing all of the words)?
Regardless of how you store the sounds you will need a way to map text to the sound and the random number (Math.random()) to one of the two.
Finally create a JavaScript function that resets the text and gets a new word every time the user gets the word right or when the initial start button is clicked.
Once you reach any questions on the actual coding, search for the problem in SO (odds are it has been asked before). If you can't find an answer to your question create a new question (you should read How to ask first).

boostrap hide/show buttons based on variable [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm (trying) to build an app based on boostrap/javascript/ and a nosql DB
a sort of small CRM/invoicing system
i need to show/hide button based on variable
for example for a quote, status could be "open", "lost" "win"
so on my quote details page when status of quote is open i want to show button
- win (who change status of quote id in db to win and copy quote to an order)
- lost (who change status of quote id in db)
but i want to hide button "Re-open" who change a cancel status to open
and so on for my different status..
so want i'm looking for is a way to collapse/hide some button depending of the status of my quote (i put the status of my quote in a variable called quoteStatus)
any suggestion will be welcome
thanks
jeebee
You can do something like that
if (quoteStatus==="value"){
document.getElementById("buttonId").style.display='none';
}
else{
document.getElementById("button").style.display='block';
}
this is just javascript, you could use jquery it will make it easier for you, so your code may look like that
if (quoteStatus==="value"){
$("#buttonId").hide();
}
else{
$("#buttonId").show();
}
To get more positive reactions to your question you have to show some research effort. This question is not useful in that mather that you havent actually showed us what you have tried, and the purpose of your functionality have possibly been asked and explained before? How to hide/show div based on variable using javascript. A div and a button is both elements.
Either way, as for your question, we need to know what you already have. The task in itself have several ways to be accomplished, and based on your existing code there could be a way to complete this task in a more correct manner than others.

OS X login page like HTML [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I know the Title is a little obscure, but I will try to explain my best. Since OS X Lion the login screen of the Macs presents a row of images of the available users. Once you click one of those images, the rest disappear, centering the clicked one and revealing a password field.
I want to do a similar thing in a web-app. I have a few users, and I want them to click on their image to reveal the password field.
I searched for similar options, but can't find anything, and I don't even know how to proceed. I guess JQuery or Javascript would be necessary, but those I know little to nothing (HTML & CSS shouldn't be a problem, but well, I don't even know how to start this simple thing... )
Thanks!
Google is your friend... no matter how much the NSA are watching. Use it to search for tutorials, these are the best way to learn. Mostly CSS will be needed to make it look like the OSX login screen... maybe a bit of jQuery.
Within in seconds I found this page of many examples of login forms. And then I found this one that looks very similar to an OSX login page.

asp.net mvc a grid of results with close buttons [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Currently converting an old asp.net web forms page into a asp.net mvc version, and a little stuck on something that isn't a major deal, but would be a nice to have.
When the user logs in, they are taken to a messages page at /Alerts. They can close individual messages by clicking the x's, and then if they close all the message they are moved onto another page automatically.
The original site did postbacks, so the URL stayed the same. In my new version, I planned to make the x button a link, that went to /Alerts/Confirm/xx where xx is the id. The problem is, after processing, the address bar stays on that url, whereas I'd like to leave it on /Alerts
The four solutions appear to be either:
1) using AJAX to do the processing;
2) a redirect back to /Alerts after processing;
3) replacing all the X links with a submit button, and using javascript to pass a different ID depending on which message is being acknowledged, so that I can change the Confirm method to an HttpPost-accepting Index method?
4) URL Rewrites? (not sure about this, just thought of as I wrote this)
Or am I missing something obvious that would do what I'm trying to achieve?
I agree with #1 and use Jquery to do it.
Or you could show/hide those messages using Jquery .show() .hide(). So, they would always be there, just hidden. When they hit refresh they would show again.
You can also use some sort of notification plugin for jquery, there are many available just google for it, this page has about 6 examples, it is a bit old but you can get an idea.

Categories