Passing parameters to a DOS batch file called from HTML - html

I have one question about executing a batch file which is linked via an HREF from a HTML page.
Till now I have the link to the batch file and it's executed without problems if I click on the link
> Call dos batch
This works fine.
Now I want to extend this to:
> Call dos batch with para
With this string, I get the error "The page cannot be displayed"
I allready tried several combinations with %22, %20, single quotes, double quotes and so on, but with no success
Has any one a hint for me ?
Thanks in advance,
Zirod

Links in HTML trigger your browser to fetch a file, and either render it if necessary (HTML, SVG, images, etc.) or prompt for a download for anything else. Links in HTML are not like a shell; you can't pass shell arguments to a file assuming it will be executed.

Related

How to adjust page size while publishing?

Software: Octave v7.1.0
There seems to be no option of defining the page size while doing publish ("FILE", "pdf") . The manual for pdf is: 11.11.1 docs.octave/.../Publish.
It's kinda surprising as it's a one word addition to the output TeX file : a4paper. I can do this manually each time I publish but being able to specify it somehow within the publish function would be awesome.
Surprisingly, there are plenty options for specifying page size in figures and images. Search for papertype at: 15.3.3.2 docs.octave/.../Figure-Properties
I searched with "Matlab" and found this page, and it fetched the results for "Matlab Report Generator" mlreportgen which seems a different thing.
I'd be interested to listen about other ways of doing it automatically too (like adding that word in TeX file via shell scripting and text string manipulation maybe).
As directed by #cris-luengo in the pointer comment to the linked manual, one solution can be to edit (or create) the function files (to used by the publish function) with the desired changes to specify the paper size.
The function files location can be found by:
opening the function file in octave gui and then proceeding from there:
edit (fullfile (fileparts (which ("publish")), "private", "__publish_html_output__.m"))
or, executing the following in octave REPL/command line:
fullfile (fileparts (which ("publish")), "private")
There, among other files, 2 files will be:
__publish_html_output__.m
__publish_latex_output__.m
Edit the _latex_ containing file to add ,a4paper (or other predefined size in latex) alongwith 10pt in the line '\documentclass[10pt]{article}',, optionally with a comment in a proceeding newline as a reminder that you added it, something like: '% Modification: specify a4paper',
If pdf format were directly specified as a new function file, then I'd have preferred to modify its copy and calling that directly in publish(), but since the publish pdf eventually calls publish latex, so, the only option at hand in this method seems to edit the original publish latex function file itself.

How to add dynamic data in an HTML document via a Power Automate flow?

I'm working on a flow to take data from a SharePoint list, and add it to a specific point in HTML. I am just saving the outputted HTML file to my OneDrive whilst testing.
I have found that when pasting my HTML code into a compose block, then outputting this, it works fine and I'm left with a normal looking HTML page when opened in a browser.
However, as soon as I add dynamic data in place of certain HTML elements it all seems to go wrong.
Firstly, the outputted HTML file now contains '/n' in place of every line break. I have also noticed that the outputted HTML code has now been changed to an array.
I've attached screenshots of my flow below.
Get Items:
Compose:
Create File:
Create File Peek Code:
Compose Output:
Create Output:
Create Output Raw:
Outputted HTML File:
Are you processing the output from that Compose action?
What you are doing is correct and it would not matter if you are using a single or multiple lines of text.
It seems to me that you are using the output of the compose somewhere else or maybe the file content box in the OneDrive action has an expression?
Please check the following:
The output of the compose should look normally
Make sure your OneDrive's action parameters look like this when you "Peek code" (Click on the action's ellipses). If it looks different, you'll have to track the variable/output you are using or review the expression.
I have replicated what you are doing and it is working fine, see attached images.
Edit mode:
Run:
Compose action
OneDrive action
Created File in OneDrive:
EDIT: Update response to use the result from SharePoint in two different ways.
Use the OneDrive action inside the 'Apply to each' if there is only 1 result, it will run once anyway.
You can omit the 'Apply to each' action using the expression box to set the values in the Compose, this is the syntax you can use.
outputs('Get_items')?['body']?['value']?[rowIndex]?['ColumnName']
In case there are several rows in the result, you'll have to validate which is the one you need.

Syntax for # literal in ms-access hyperlink?

This seems like it ought to be a trivial question, but I'm having a hell of a time finding an answer for this so far...
I have an access database that stores hyperlinks to files on a shared network drive. The link targets are specified as simple file paths (e.g. "G:\directoryname\filename.ext") rather than proper URL's ("http://domain.ext/link").
This works fine in general, but I've recently run into a problem involving file names that contain the "#" character. (It is not an option to change the file names to remove the # characters)
If I try to set up a link to something like "G:\directoryname\ExampleFile#24.pdf", then Access parses the # in the filename as it would generally do when it defines a hyperlink. The resulting target is just ""G:\directoryname\ExampleFile", with the portion of the link following the offending "#" simply being truncated.
Now, obviously if the link target were a regular URL, I would just replace the "#" in the text of the link with "%23" and there would be no issue.
The problem is that, if I do that here, my network file action fails, because unlike when opening a regular URL through a browser, the network doesn't recognize %23 as equivalent to # ( I get an error saying "Unable to open G:\directoryname\ExampleFile %23 24.pdf. Cannot open the specified file.")
Is there a more direct way to have ms-access record the link target with a literal # character included?
Well this certainly doesn't help you but here is your answer:
"You cannot use a pound character in a file name for a hyperlink in an Office program"
https://support.microsoft.com/en-us/kb/202261

OpenFile Dialog MS Access 2010

I followed the suggestion by Cody Gray about halfway down the page in this thread but I'm having no luck.
Unless I'm missing something, this is supposed to allow me to navigate from Access, using the Windows API Dialog Box, to the relevant folder and open a file, no? I'm trying to open a Word doc which has a Mail Merge coming back to the same Access Db. I needed the dialog because there are multiple files that may be selected at different times.
I added all the suggested code and while the process runs without error, when I get to the final step, the selected file doesn't open. Nothing happens.
I realize this is not much help without an error message. Any thoughts nonetheless?
As I understand the situation, you have code which uses a string variable named strFileToOpen to hold the path to a Ms Word document. And now you want to open that file in Word.
You can use the FollowHyperlink method.
Application.FollowHyperlink strFileToOpen
Look at the Access help topic for that method. It offers other options you may wish to use.
Also I suggest you look at the help topic for FileDialog Object. It is simpler than the Windows APi method in the code you linked.

How do I insert HTML to a onenote page using VBA

Background
I use Onenote at work like a scrapbook, keeping track of assigned tasks and my progress through those tasks. Tasks are assigned via an automated email (outlook) typically these tasks involve manually reading web pages and filling in other webpages with results.
So far I've used the email arrival to trigger a VBA script which use uses data in the email to save the "requirements.html" page and the "ingredients.html" page locally. I then use python to parse and do some initial verification on the ingredients.html. This results in an augmented "requirements.html" containg colour coded status of parts.
my question
I've pretty much cut'n'pasted this code and managed to add a new page to section X of notebook Y (where x and y are strings passed to the function) or creating a new section by copying section.one file into the notebook folder DEST = "C:\Documents and Settings\Me\My Documents\OneNote Notebooks\Tasks\" + rqst_section + ".one"
while the code adds plain text to the page adding raw html source code in place of the plain text results in a object error when line
oneNote.UpdatePageContent doc.XML
is executed.
Has anyone managed to get the same result using VBA as this manual sequence,
select all text in browser window and copy 'n' paste it into a page in onenote.
I was getting a "UpdatePageContent" in "IApplication" failed error message, found out I had a Form Feed (chr(12) or vbFormFeed) character in a textfile I was trying to insert text into a page. Stripped that out and everything else seemed to work fine. Run the offending data through a hex editor, or strip it down little-by-little until you find the problem area.
Hope this helps.