Autoclick a link - tampermonkey

Street Sweeper (19)
Gardner (23)
On a page, these are creatures that spawn. To kill them, you just click them and the battle starts.
I want to know what kind of script would click them automatically. In this example, there are two things to kill - sometimes there are none, sometimes there are more. I can only click one at a time. just want to know if there is a way I can have them autoclick

Related

Loop video file placed in interactive pdf

I have an interactive pdf document that is displayed fullscreen. there's a navigation bar that users can press to jump to different pages.
What I need is some sort of looping screensaver (a collection of photos) that can be enabled by the user pressing a button.
I considered dropping in a video of a slideshow that I made in after effects, until I realised it's not that easy to loop the playback of that video!
How can I loop a video that I have placed onto a page in a pdf? I've read somewhere about swf's looping but I've tried that and there's no loop option when I place the file in acrobat?
Can someone give me some advice as I thought it would be pretty straightforward to loop a video and now it's looking far from easy.
Thanks
If it is just a slide show, meaning changing images at regular intervals, a few things could be done with Acrobat/Reader's on-board means.
In Full Screen, Acrobat allows to cycle through pages every whatever second. A button on those "screensaver" pages would get back to a "real" page. The question is whether that would interfere with the rest of the document.
Another approach would be having a Button field, icon only, read-only, no action, where you would show an image (preferably PDF) as an icon, and have a control loop running (using interval, timeout) loading different icons. This could be implemented with quite little JavaScript.

Auto-fill program registration form

We use a program called vspace created by ncomputing. This allows for example 4 stations on a single host machine. So, each time this is installed we have to fill out the registration form which pops up when finalizing the installation. It only takes roughly 20 seconds or so to fill out, but that's 20 seconds for a couple hundred computers, so I am trying to find something that will take the information and fill it in.
I have no idea how to accomplish this. One thing it could do, is when I fill it out manually, I "tab" to the next block. If it could say, fill, tab, fill, tab and so forth with the pre-programmed data starting at whatever the currently selected field was, I think that might be easiest.
Here's a photo of the registration screen. It defaults the cursor to the first block "name" and none of the drop boxes have to be edited.

'Game loop' in a none-game application?

In real-time games, there is always a game loop that runs every few milliseconds, updates the game with new data and repaints the entire screen.
Is this something that is seen in other types of applications, other than games? A 'constant-update-loop'?
For example, imagine an application like MSPaint. The user can draw lines on the screen with the mouse. The line that is being drawn is displayed on the screen as it is being drawn.
Please imagine this line is actually made of a lot of smaller lines, each 2 pixels long. It would make sense to store each of these small lines in a List.
But as I said, the line that is being drawn (the large line, made out of lots of small lines) is displayed as it is being drawn. This means that a repaint of the screen would be necessary to display the new small line that was added the previous moment.
But - please correct me if I'm mistaken - it would be difficult to repaint only the specific part of the screen where the new small line was drawn. If so, a repaint of the entire screen would be necessary.
Thus it would make sense to use an 'update loop' to constantly repaint the entire screen, and constantly iterate over the list of lines and draw these lines over and over again - like in games.
Is this approach existent in non-game applications, and specifically in 'drawing' applications?
Thanks
Essentially you do have a loop in all applications, and games. How that is implemented depends on the system and desire of your application/game. I will loosely base my response toward the Windows system, if only because you mention MS Paint
MS Paint will likely NOT contain a List of lines like you are mentioning, instead it will edit the bitmap image directly each frame, coloring the required pixels immediately and then drawing it. In this situation drawing small portions of the image/application is as easy as telling "this part" of the image to draw itself "over there". So as you move the pencil tool around the pixels turn black and get drawn.
MS Paint and most applications will use a primary loop that WAITS for the next event, meaning, it will allow the operating system (Windows) to not process anything until it has messages/events to process (such as: Mouse Move, Button Press, Redraw, etc).
For a game, it needs to be a little differently. A game (typically) doesn't want the operating system to WAIT for the next message/event before processing continues. Instead here you Poll the operating system to check if there are messages to be handled, and if so handle them, if not continue with the game creating a single frame (perform an Update and Render/Draw the scene.)
MS Paint doesn't need to keep updating and drawing when the user is not interacting, and this is preferred for applications because constantly updating/drawing uses a lot of system resources and if every application did this, you wouldn't have 30 things running at the same time like you probably do now.

ItemsControl refreshes in two stages because there are too many items?

I have a Window with an ItemsControl that places symbols on a map. The symbols are rather complex (each one is composed of several UserControls).
I have a handful of scenarios, and each scenario places a unique set of symbols on the map. There is a drop-down menu that allows the user to switch between scenarios.
If the user switches to Scenario A (which has 22 symbols), the entire map refreshes in one shot.
If the user switches to Scenario B (which has 39 symbols), the map appears to refresh twice. Some parts of the symbols are drawn, then a brief moment later, the remaining parts of the symbols are drawn. In the end, the symbols appear correctly, but the two-stage refresh is very awkward and looks unprofessional. (It would be as if you were trying to place a bunch of cars on a road map, and instead of the cars just appearing, first the bodies of cars appeared, then a moment later, the wheels and mirrors appeared.)
In trying to debug this, I thought about what was different between the two scenarios, and really the only thing I could think of was that the number of symbols were different. (The differences in the particular attributes all seemed pretty random.) So, I ran a test with just the first 22 symbols of Scenario B. The map refreshed in one shot. I upped the number of symbols several times, and the map still updated in one shot. When I reached 38 symbols, however, the map updated in two stages again. Just in case there was something strange about the last two symbols, I tried skipping the first two then grabbing the remaining 37, but the map updated in one shot again. Finally, I tried skipping the first symbol then grabbing the remaining 38. Now it was back to updating the map in two stages.
Bottom line: if the ItemsControl tries to render 38 or more symbols at once, it happens in two stages, otherwise, it happens in one. I'd like the map to refresh in one stage regardless of the number of symbols.
From what I've read about WPF virtualization, I don't believe this behavior qualifies as virtualization because, once the rendering is complete, none of the symbols are hidden or off-screen. My monitor is large enough that there are no active scroll bars.
So, I'm completely mystified by what I'm experiencing here. Any ideas appreciated.
Update
I tried setting the Visibility to Hidden, then performing the update, then setting the Visibility back to Visible. Makes no difference. The map still refreshed in to stages. (I also tried Collapsed instead of Hidden, still didn't work.)
The stuff you explaind seems to be really mystic.
Maybe it could be a temporary option for you to set the opacity of all redrawn symbols to 0 and the visibility to collapsed or hidden.
When choosing the scenario the visibility of all elements changes to "visible".
When the last symbol calls the IsVisibleChanged-event you set the opacity of all elements to 1.
I know, it would be a very unprofessional and rudimentary solution but this could be (if this works) a quickfix for your problem until a really (or more) professional solution will be founded.
kind regards
Shounbourgh

What's the max size I should use for a WinForm dialog?

I'm designing some dialog boxes, and I'm having a hard time to fit everything. (and it has to fit on a single dialog box by design, so please don't tell me I should make two dialogs instead of one:))
I'm wondering what's the max size a dialog can have before being annoying for the end user. Of course it should't be bigger than his resolution, but are there any other boundaries to consider?
I'm trying to limit at 800x580 (so that it can display fine on a 800x600 screen without hiding the taskbar), but I expect my users to be on 1024x768 or better screen resolutions.
Is a 800x580 dialog box ok, or is it too big?
Have you considered using a tabbed layout?
Also, I believe the smallest main-stream screen resolution is 1024x600.
I'd say anything over that is too big. I try to stick below 1000x500.
I'm writing this on a netbook (ASUS) with resolution 1024 x 600. I've also noticed this is a defacto standard for most other netbooks too.
Another option: you could create a dialog that resizes itself automatically to fill the current desktop (except for the task bar).
It could also enforce a "flow" style layout for it's child controls. This would ensure the best use of the available space is made.
To get "flowing" in Windows forms you can use either the flow layout control or (for a richer interface) the WebBrowser control.
By the way, modal dialogs seem to be less popular as a way of user interaction these days. Especially large dialogs containing a lot of information/controls. This article has some good alternatives.
I think that if the user NEEDS to see all data on screen at the same time... and you can fit everything in 800x580... I think that it's a fine size.
If you know all users have bigger resolutions so don't struggle... that size is OK.
However... a way of showing lots of information and being able to edit it... could be a PropertyGrid control (an example here)... may be that could shrink a bit the form if you don't feel confortable with it being so big. Don't know if it a possibility given the needs of your client/user.
Just hope that no-one ever tries using your app on a media center running through a standard definition display. That's 640x480 for NTSC. I've suffered this problem with quite a few apps.
Whatever your pixel by pixel size, if it takes more than a few seconds for skilled users to complete the use of your window, then it shouldn’t be a dialog. Anything longer is annoying. You’d be asking your users to do too much work that is too easy to lose (e.g., by hitting Cancel accidentally) and too hard to re-entered (e.g., between sessions). If you have so many controls that the dialog needs to be 800 by anything, then it’s too many controls. 200,000 square pixels and 40 controls is the very most you should consider for a dialog. And tabs are nature’s way of saying your dialog is too complex.
Dialogs are for entering parameters to execute a single command on one or more data objects visible in the primary window for the dialog, which is why dialogs need to be small and simple. I suspect that’s not what you’re doing. Instead, you’re using a “dialog” to represent the main data objects and carry out a major task, not a single command.
What you want is a primary window, not a dialog, with all the support necessary for the complicated task you’ve set up for the user. That includes providing a means for users to save, retrieve, and copy their work. That means a menu bar and toolbar with all the standard commands, including help. The window should absolutely be modeless, and be resizable, maximizable, and minimizable.
Primary windows should be designed to work best at the size of most (over half) of your users’ screens. 1024x768 is generally fine for today’s laptop/desktop screens, not that you should use that much space if you don’t have to. If the user’s screen is smaller, or the user for any reason resizes your window below the design size, then scrollbars should appear to allow full access to all controls and content in the form –just like any primary window. The experience on the web indicates that scrolling is not a showstopper for forms.
Beyond that, tabs may be used in a primary window to increase the number of controls on it. You said you don’t want to hear about multiple windows, but multiple windows should be used instead of tabs if the user will be comparing data across tabs/windows. You can also fit more in a given primary window size by using a compact presentation (I describe this at http://www.zuschlogin.com/?p=42), but test such an approach on your users before committing to it.

Resources