TL;DR
An absolute AHK neophyte asks: How do you tweak an AHK script so that a full-screen image can display properly on a 4k monitor (considering the script was originally written for a 1080p resolution)?
Here's the program I'm trying to fix:
https://www.dropbox.com/s/sbypodhincq6jnm/Install%20God%27s%20Presence?dl=0
Full version of the question:
Hi! I have a little AHK script that executes a very simple task: it displays an image across the entire screen for 30 seconds every 30 minutes.
It worked well for my old 1080p display, but recently I switched to a 4k one and the image now occupies just a small corner of the screen.
So I wondered if you could help: How can I get the image to display full-screen on my new 4k device?
I have a hunch this should be easy to fix if one just tweaks a few numbers here and there, but that's all I know. I've searched around in the AHK forums, but strangely I can't seem to find an answer for this specific little problem. So I apologize I can't offer more info!
Here's the program I'm trying to fix:
https://www.dropbox.com/s/sbypodhincq6jnm/Install%20God%27s%20Presence?dl=0
Related
I am making a custom Unity Editor GUI window and I just want it to stay and the exact center of the screen. Surprisingly, this is harder than I thought it would be on Macs.
This is my code:
....
windowRect.center = new Rect(0, 0, Screen.currentResolution.width, Screen.currentResolution.height).center;
....
The problem is, on a 5K iMac, which has a native resolution of 5120*2880, by default the macOS uses HiDPI to scale everything to 2560*1440. In Unity, Screen.currentResolution returns 5120*2880 without considering HiDPI scaling, but I need that sweet scaled resolution.
I've tried other functions as well. Display.main.systemWidth returns 1920 instead of 5120 or 2560.
Is there a way to do this? Or am I just out of luck? I am using Unity 2018.1.9f1.
Also, if there is a way to get the size of the whole Unity Editor Window(not the game window), I would be fine with it. Thanks in advance!
In Editor, Screen.currentResolution show the resolution of game window. You can enable Maximize On Play to use the maximized window resolution.
And if you deploy to MacOS app, it should be the 5K resolution correctly.
This in an old thread, but in case someone is still wondering, I found out that the highest resolution returned by Screen.resolutions on a retina device is the « magic » resolution. It’s the one that you see in the device settings as « Looks like X x Y ».
This is not mentioned in the doc as far as I could see, so I am not certain in can be relied upon in the long run, but it’s the case currently with Unity 2018.3.
Not quite the same as centre of the screen, but I was having a similar issue and solved it using:
EditorGUIUtility.GetMainWindowPosition().center;
I recently created an app in flash cs6 to be used on my iPhone 4.
The app doesnt need to work through the app store its just a tech demo but when i put the app on my device all the animations become really slow/choppy.
My iPhones up to date and im using air3.2 (i did try updating to air 3.7 but then my application just became a white screen)
I have also tried cacheing all the movie clips as bitmaps bit it doesnt seem to make a difference.
(the app works fine inside the flash simulator)
please help?!
There could be a few reasons why this is happening,as I am taking a punt here as you havent gave much information on what your doing.
but your frame rate may have effect.. how are you creating your tweens?timeline animation or tween scripts.I found tween scripting works better as its distance over time opposed to distance over frames.
Also depending on your animation, images sizes, event listeners etc..
You need to take inconsideration your device itself and the resources it has available, free memory or actual storage available.
The reason it will work freely on your PC would be due to the fact of less limitations, your pc has more to computes and resources to throw at your application .
Add this line to your code to check your memory:
import flash.filesystem.File;
this.addEventListener(Event.ENTER_FRAME,performMemTest);
function performMemTest(e:Event):void {
trace(System.totalMemory);
}
I have read anywhere around 14MB++you may experience problems.
I entered Safe Mode on an XP box (yeah, I know, it's OLD but it still works fine) and after it came out of it, the display is now blurry / fuzzy - across the entire display. From the icons on the desktop, to the font on Netscape, everything is now rendered in some kind of low resolution font that makes it unreadable.
I tried to get it to upgrade the display device driver, but it reported that it is 'up to date'.
This is just so strange .. I mean, why should going into safe mode result in an unusable computer?
Has anyone ever experienced something like this?
Ok, I guess I will have to probably scrap this box. I'm feeling down. But, this is not the way it should come to an end.
TIA !!
DOn
When you enter in Safe Mode, low resolution video is activated, but doesn't change anything IN the hardware, your video card might be damaged, usually weird colors and crappy random images are a memory error common problem, the buffer to show the image, is corrupted.
I'm trying to use tesseract from command line to run OCR on the content of an opened window. In particular I'm willing to read the text typed into a current opened Notepad window.
I've read the documentation and the wiki here: http://code.google.com/p/tesseract-ocr/w/list
but I didn't find anything that helped me in this project, further more I've also searched here for similar questions ( there are many about OCR) but nothing seems to work/ be applicable in my case.
Is it feasible?
I'm mainly a PHP coder (coding just for fun) and have no experience in non-web languages.
Thanks in advance.
Tesseract is designed to take a TIFF image as input and know nothing about the Windows or screen Device Contexts. So you would need to add code to locate the windows handle for the Notepad window , perform a screen capture and clip the window based on the current window size reported by Windows and save the resulting image to a file. This image will most likely be black and white which will make it easier to OCR as I suspect Tesseract 2.0 only works with B/W Images. The next problem will be Tesseract gving poor results due to the low DPI (resolution) of the source image.
To evaluate the suitability of your approach I would perform some manual tests by opening Notepad, taking screenshots, opening the screenshots in MSPaint, clipping the text you want to OCR, save the clipped image to a TIFF or BMP and send this file to Tesseract. This could save you a lot of time and effort if the results are not as good as you need or expect.
This must be quite simple but I can't seem to figure this out.
I've managed to implement the code for printing an PDF from my App. Problem is, the PDF has quite some whitespace around it and with the default margins... it's just not how I would like the page to come out of the printer.
So, I'm trying to reduce the margins to minimum. How would I go about this? Do I need to use a custom UIPrintFormatter, UIPrintPageRenderer or UIPrintPaper. In which method from UIPrintInteractionControllerDelegate would I need to change things?
I know it can be done because when I print the PDF from Apple's iBook App, margines are significant less.
Thanks.
I did not quite solve the problem but I'm satisfied with the result now.
Actually I did not change anything, the reason why I asked this questing was because in the AirPrint simulator, my PDF printed with an excessive amount of white space / margin. But printing the PDF on an actual device did not have this problem.
So, if you run into this problem in the AirPrint simulator, try it on a real device/printer, changes are that everything prints fine.