Make a Simple Cross Platform Program - windows

I was wondering how I could make a simple cross platformed program. What I mean is, I want to make a program that edits iPad/iPhone files easily. I am not sure how to make this. What do I use so like it checks if you have an iPad connected and which iPad to use. Also, what I mean by simple is like all it is is buttons and texts and maybe some pictures. Sort of like Visual Basic. Is there a program that does both of what I am asking for or would I need 2 separate programs? If you don't understand what I am asking, please just say so, because I would really like to make this app. Thanks! Btw, I have a Mac, so if you could suggest Mac programs I could use. :)

Related

How can I make ONE big desktop icon on windows?

I would like to make one desktop icon extra big, without affecting all the others. Why? Because I am trying to help out someone with a visual impairment. The reason is that I would like to make it do something special, like enabling/disabling Bluetooth or VPN. A natural alternative would be to have something with a small window, already running, but I was hoping to avoid having to program a new UI.
Is it possible to make a single desktop icon larger so that it would extend (lets say) 4 others?
(If not, what would be the better alternative solution?)
Windows doesn’t support this natively. You can make desktop icons larger or smaller - all of them, not just one, as you already know.
There might be a third-party program which does this, but I haven't discovered one.

How to clear console in Windows

I want to clear the console
I tried using this, but it doesn't work for Windows
print!("\x1B[2J");
Is there an easy way to clear the console?
I think I need some clarification first, on what you're attempting to do. Regardless, this is my best attempt at answering your question <3
Preamble
Given that different terminals work differently and have different APIs, I think you probably will want to use a crate that provides this functionality in a cross-plaform manner.
I'm assuming from here on that you want cross-platform functionality and that you don't mind using external dependencies. If this is correct, you might be happy to know that the terminal interaction crates are actually really developed in the Rust ecosystem. I have heard only good things about them.
With that out of the way, let's move on.
Do you want to just perform actions on the terminal?
If you just want to perform some actions on the terminal, like "clearing", "scrolling", "moving the cursor" and whatnot, I think you will be satisfied with the terminal crate. It allows to perform many actions, like clearing, independently of the platform you're in. It also allows for using interactivity features like interacting with the Mouse and the Keyboard :3
Or do you want to write a GUI for the terminal?
If what you want to do is write a Console-based User Interface though, I think that what might work for you instead is the tui crate. It has all of what you need to build terminal GUIs, from clearing of the console up to graphical widgets. Tools like gitui are written with tui.
Did I answer your question? Feel free to follow up if I fell short :)
I've found a way to clear the console in rust
By using console crate, console.clear() method

Interact with GUI Elements of a Windows Application

First of all, I want to appreciate the work for the SCIDvsPC Project. I know that the basic SCID one has been discontinued many years back and the developer have done a great job with expanding it and doing his share for the Chess Field. We have a Minor Project to do in this 6th semester of our college. We've decided to start a project on a Chess Next Move Analyzer that is based on variety of filters and implements Self Learning and Machine Learning.
I've been researching over the project idea for the last 2 months. Actually we need to import several games defined on some filters and read and analyze from the PGN file generated. For example, if the user chooses to get the next best move predicted according to the rating range of 2000-2500, our program should only export and analyze the PGN files that have both the opponents from this range only. I know the project can do all this but I'm confused over how to automate this. I mean I have to manually enter the moves and then click on 'Generate PGN' but how to make my program do this ie take input from the user (like first 3 moves), make the project run these moves (what I had to manually) and then generate the PGN file and keep it in a folder.
I've surfed the net about interacting with GUI elements in Windows (we have no problem in working with Linux either) and came to know about Microsoft UI Automation, Python, Java and C# softwares and something like COM. Do the software support COM or any one of these or have you already developed some functionality like this? Please can you guide me over this?
If asked to Generalize this what I want to do is to interact with GUI Elements, be it any application. Take Notepad as an example. Suppose I want to open a file on it, find and replace a particular word. Now, I know how to do this manually but when I have over thousands of file I need some kind of program to do this for me. Do some specific programs like SCID in my case has some feature (read bit about COM) pre-built to handle this? In which programming language domain does this come into? Is using Linux help me more?
Take Notepad as an example. Suppose I want to open a file on it, find
and replace a particular word. Now, I know how to do this manually but
when I have over thousands of file I need some kind of program to do
this for me. Do some specific programs like SCID in my case has some
feature (read bit about COM) pre-built to handle this?
Your situation sounds to be quite specific so I doubt whether you will be able to find a pre-existing program to do this for you. Meaning: you'll have to code it yourself.
In which programming language domain does this come into?
Well, this could probably be done in many, many different programming languages. A simple shell script would be able to achieve the Notepad example you gave.
Is using Linux help me more?
No, your goals seem to be pretty achievable by a simple shell script, whether you write it in a Windows, macOS or a Linux distro.
#SB87 gave you some useful hints, I'd like to expand his answers.
Sorry, I don't think you know what you're talking about. Reinforcement learning (better term than self-learning) and machine learning are not something suitable for a college project. It's at the PhD or research level, consider getting yourself into university before even thinking about anything like that.
UI automation is possible, but error prone and slow. If you want to do it, you'd write a console program. You mentioned something about user inputs, do you mean you want to apply machine learning on user mouse-keyboard inputs? It's not going to work. Machine learning for chess requires hundreds and thousands of training set.
I think you should downplay the project and focus on something you can achieve.

MonoGame Platform Agnostic Input/Output

I've done a bit of XNA work, and I'm now trying to work in MonoGame. Previously, for all my input and output needs, I used Microsoft.Xna.Framework. I'm now trying to make one version of my game to deploy on as many platforms as possible (excluding, at the moment, touch interfaces), but I don't know what I should be doing regarding the mouse, for example.
Does MonoGame make Microsoft.Xna.Framework platform-agnostic or do I have to use other frameworks and switch between them depending on the platform?
MonoGame is designed to make it easy to port your game to other platforms, you shouldn't need to use any other frameworks to achieve that goal. However, it's not as simple as simply recompiling the code for each new platform.
For the most part all of your code will remain the same, but you'll need to put together a project for each platform and link all of the code files in each one. I won't go into detail about this, but I'll just say that you can do it and it's not that difficult.
Now, what you will find is that you may have to write some platform specific code to handle device specific stuff like screen scaling and input handling. What exactly you need to do will depend on your game, so I can't really explain that in detail either.
To make your life easier, it can be helpful to think about how your game is going to work on other platforms and write your code accordingly. For example, a touch on mobile device is very similar to the click of a mouse so you could wrap this functionality in a method of your own to minimize the code changes required when porting. On the other hand, some things you can do with a mouse simply don't work on touch interfaces, like right click, and hover. Similarly, touch interfaces have commonly used gestures that don't really map to a mouse on a PC like long press, swipe and pinch.
So the short answer is, you don't HAVE to do anything special, but you should at least think about it if you plan to port your game in the future.

need to make a simple Windows app, what languague should I use?

I need to make s very simple app, with a canvas where the user would be able to drag & drop PNG files, drag, scale and rotate them on the canvas and export to XML their name & coordinates.
I'm pretty good at Android(java) programming, but as I just tried plain java with windowsBuilder for the first time, it appeared to be rather inconvenient and probably would take at least a few days to find my way around in it.
So I thought, maybe you could suggest some simple "program maker" style language/ide that could be quickly picked up for such purpose?
Right now I'm thinking of Flash... any other ideas?
Thanks!
I would go with C#, with the .NET framework.
As you already know Java, it shouldn't be that hard, as C# is also an object-oriented language.
They are some differences, of course, and I won't explain them here.
But if you want a real Windows app, it may be your best choice, as you'll then have access to all the Windows features through the .NET framework.
Everything is very well documented.
You can also choose C++ (managed), but it might be a little harder, coming from Java.
About the IDE, simply use VisualStudio (the express edition is free).
Hope this will help.
I learned JavaScript (I know it's not Java, but similar nonetheless and still object oriented) first and then C++. The transition was quite easy since both are more-or-less object oriented. Like Macmade said, Visual Studio is great to begin, but I prefer using gedit and then compiling with G++. It's more forgiving than Visual Studio and you don't have to create a project and whatnot just to start writing the code. With a text editor like gedit and a standalone compiler, G++, it's much easier to just write the code and then build the program.
I'd stay away from Flash. I know AS2/3 pretty well and I can say that C is much easier to code, at least for me. Everyone has their personal preferences, though. One plus to C is you don't have to buy Flash.

Resources