If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Screenshot of app status
21 posts
• Page 1 of 3 • 1, 2, 3
Screenshot of app status
Hello,
First of all, sorry if my question is dumb but I'm quite new at this. Forgive me. Also, forgive me for my English, it's not my first neither my second language.
I use FS to make simple tools for our company workflow and in one of these tools, I would like to be able to create a screenshot of the app with all the input and output fields as they are at that moment when a button is pressed.
I know how to save an image file but I don't understand how to create an image from the app appearance in real time.
Any hint or guidance would be extremely helpful.
Thanks in advance for your time and best regards.
First of all, sorry if my question is dumb but I'm quite new at this. Forgive me. Also, forgive me for my English, it's not my first neither my second language.
I use FS to make simple tools for our company workflow and in one of these tools, I would like to be able to create a screenshot of the app with all the input and output fields as they are at that moment when a button is pressed.
I know how to save an image file but I don't understand how to create an image from the app appearance in real time.
Any hint or guidance would be extremely helpful.
Thanks in advance for your time and best regards.
Michele
---Programming to promote laziness---
---Programming to promote laziness---
-
MicheleANE - Posts: 8
- Joined: Tue Aug 18, 2020 5:15 am
Re: Screenshot of app status
Hello and welcome to the forum!
If you hadn’t said English wasn’t your native language I wouldn’t have guessed! I’m English so the compliment counts!
I’m not sure I can help but am I right in thinking you want to trigger a screenshot when you click on a control in FlowStone?
If you hadn’t said English wasn’t your native language I wouldn’t have guessed! I’m English so the compliment counts!
I’m not sure I can help but am I right in thinking you want to trigger a screenshot when you click on a control in FlowStone?
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Screenshot of app status
That would only be possible if you make no use of Windows controls. If you draw all the fields with GDI+ (= green prims or Ruby), but not edittext or popup menu or other Windows controls.
Normally you would draw to a view. Instead, you draw to a bitmap (there's a prim for that) and then draw the bitmap to a view. When a button is pressed you then just access the bitmap and save it to disk (another prim exists for that)
Normally you would draw to a view. Instead, you draw to a bitmap (there's a prim for that) and then draw the bitmap to a view. When a button is pressed you then just access the bitmap and save it to disk (another prim exists for that)
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Screenshot of app status
@Spogg: Thanks for the undeserved compliment and yes, that is what I would like to obtain.
@tulamide: Thanks for the info. On a vaguely related point, is there a way to extend ruby inside FS with gems or libraries like CSV? If yes, maybe there is a ruby library that makes it possible to capture screenshots...
Thanks again for the help
Best regards
@tulamide: Thanks for the info. On a vaguely related point, is there a way to extend ruby inside FS with gems or libraries like CSV? If yes, maybe there is a ruby library that makes it possible to capture screenshots...
Thanks again for the help
Best regards
Michele
---Programming to promote laziness---
---Programming to promote laziness---
-
MicheleANE - Posts: 8
- Joined: Tue Aug 18, 2020 5:15 am
Re: Screenshot of app status
As an alternative, there are many free tools for Windows which records the screen either as a screen capture image or as video. Windows 10 has a built-in one - https://betanews.com/2019/01/14/windows ... -ultility/
Record 1st the functionality in question and then save those frames you want to images.
Record 1st the functionality in question and then save those frames you want to images.
- juha_tp
- Posts: 60
- Joined: Fri Nov 09, 2018 10:37 pm
Re: Screenshot of app status
MicheleANE wrote:Hello
Welcome to the forum!
Before I start talking about the previous suggestions; there is another possible method: This StackExchange thread suggests a few command-line tools for saving screenshots, which FlowStone would be able to call using the "Shell Execute" primitive (or from Ruby). This may be the simplest solution, given my comments below about other methods.
[EDIT: Aha - I see @juha_tp has had similar thoughts while I was typing!]
MicheleANE wrote:is there a way to extend ruby inside FS with gems or libraries like CSV?
Unfortunately, the way that Ruby has been adapted to work inside FlowStone means that it doesn't support Gems. External code can be loaded using Ruby's "require" method, so long as it is pure Ruby source-code text (".rb" files), but not binary "C-extensions" (".so" files). This strictly limits which external libraries can be used - for example; a screenshot library would have to call the operating system, which may require a "C-extension".
tulamide wrote:Normally you would draw to a view. Instead, you draw to a bitmap...primitive[s] for that...
That's what I thought too - so I decided it would be a nice little "coffee-break puzzle". However, while I can save the bitmap successfully, it also breaks all of the Ruby controls! It seems to create some kind of re-drawing feedback problem because the "screenshot" button is part of the same GUI that's being captured (I've had a similar problem before in a different GUI context). I tried putting some trigger delays in, and testing as an export to make sure the FS workspace wasn't interfering, but that still didn't work. Here's my test schematic - maybe someone else can see where the problem lies?...
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Screenshot of app status
trogluddite wrote:However, while I can save the bitmap successfully, it also breaks all of the Ruby controls!
I'm not sure if I understand correctly. Do you mean that the controls are drawn differently afterwards, or don't work afterwards?
I used your schematic (didn't export it), and it does what it should. Since no background is drawn, the jpg format set it to all black, which is normal. The elements are drawn (and in the state) as they exist, and I am still able to change text, move the knob and trigger another screenshot afterwards!
A hiccup on your system maybe?
EDIT: I just discovered that clicking the fsm starts the alpha, not 3.0.6! So while it is good to know that the issue is solved in the alpha, I can now confirm that excessive processing (aka feedback loop) is going on in 3.0.6!
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Screenshot of app status
It's the stock modules, Trog!
All of them have weird code, where somehow repetetive method calling is involved. The button for example uses scheduled events to check if it is still pressed. There are many more code parts in all three modules. I reduced the bitmap view to only one control, the text edit, and removed its (unnecessary) event method definition. This works. But of course it would need more inspection to remove the dangerous code parts from the other controls as well.
All of them have weird code, where somehow repetetive method calling is involved. The button for example uses scheduled events to check if it is still pressed. There are many more code parts in all three modules. I reduced the bitmap view to only one control, the text edit, and removed its (unnecessary) event method definition. This works. But of course it would need more inspection to remove the dangerous code parts from the other controls as well.
- Attachments
-
- Screenshot [tula].fsm
- (5.63 KiB) Downloaded 933 times
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Screenshot of app status
@MicheleANE
Given tulamide's discoveries, I'd definitely recommend a command-line tool automated from FlowStone as the easiest solution (assuming that you can find a tool that meets your needs).
@tulamide
Thanks for looking into that - some great detective work there! Now that you mention it, the other, similar bug that I mentioned was also something that Maik already had on his "to do" list (maybe exactly the same thing, I don't recall what he said the cause was).
Given tulamide's discoveries, I'd definitely recommend a command-line tool automated from FlowStone as the easiest solution (assuming that you can find a tool that meets your needs).
@tulamide
Thanks for looking into that - some great detective work there! Now that you mention it, the other, similar bug that I mentioned was also something that Maik already had on his "to do" list (maybe exactly the same thing, I don't recall what he said the cause was).
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
Don't stagnate, mutate to create!
-
trogluddite - Posts: 1730
- Joined: Fri Oct 22, 2010 12:46 am
- Location: Yorkshire, UK
Re: Screenshot of app status
Thanks everyone for your efforts and helps.
I am very new to FS, just started using it last week, so I will need sometime to incorporate all these new info.
I will post something if I ever reach a good solution.
I am very new to FS, just started using it last week, so I will need sometime to incorporate all these new info.
I will post something if I ever reach a good solution.
Michele
---Programming to promote laziness---
---Programming to promote laziness---
-
MicheleANE - Posts: 8
- Joined: Tue Aug 18, 2020 5:15 am
21 posts
• Page 1 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 81 guests