24

I don't think you can do this. As an alternative, you can have a palette with all the Mathematica windows for easy switching. Something like this quick hack: CreatePalette[ Dynamic@Column[ Button[ "WindowTitle" /. NotebookInformation@#, SetSelectedNotebook@# ] & /@ Notebooks[]]] To remove the palette window itself from the notebook ...


20

There is a built-in DateSetter: {Developer`DateSetter[Dynamic@date], Dynamic@date} By default the first selectable date is tomorrow and one can only go to future months. However, the option NotebookTools`DateSetterRange can be used to set the first selectable date to sometime in the past, {Developer`DateSetter[Dynamic@date, NotebookTools`DateSetterRange -&...


17

Yes! It is possible, although it takes some spelunking. Upon some searching with Names, I came across three relevant contexts where the predictive interface functions live: PredictiveInterface`, PredictiveInterfaceDump`, and Predictions`. This last one is where the action happens. Luckily, the symbols were only ReadProtected, and their source code was ...


14

This cannot be answered very well without knowing your C++ library much better. As you said, you have a choice between MathLink and LibraryLink. Generally, I recommend LibraryLink because: It runs in the same process, and data transfer is much faster than with MathLink It provides features that MathLink does not have, such as direct manipulation of packed ...


13

Easy! Just set Progress`$ConsoleSupport=True. You can set this in your init.m and have it always on. Now, the usual word of warning about undocumented functionality: it may change or break in the future, erase your hard-drive, or cause a global pandemic. Use with appropriate caution. Why did we hide such an awesome feature behind a flag? Because we didn'...


12

This is my solution to the problem. I keep an object at the root level which keeps track of which lists are open and which are closed. That way when a list is opened I can open it in the right state. For me, this is not a satisfactory solution because it's much slower than using OpenerView. OpenerView doesn't recompute its values when a branch is closed and ...


12

Prior to version 10 of Mathematica, there was a menu option Evaluation / Interrupt Evaluation... with the hot-key ALT-, (comma). This would temporarily suspend the current evaluation in progress. The bad news is that this menu item is gone. The good news is that the hot-key still works in versions 10 and 11. The sequence of events is as follows: Start a ...


10

I would say JLink is one of the fastest ways to do this. Just use the Runtime to start a process executing your command and collect the exit code too: << JLink` RunThroughWithExitCode[cmd_String] := JavaBlock[Module[{ireader, istream, runtime, process, reader}, LoadJavaClass["java.lang.Runtime"]; runtime = Runtime`getRuntime[]; process = ...


10

Please note: these functions have been updated with some more functionality, here: See my answer here Very old thread but, since the question is formulated in a general way, I thought it could be updated with other approaches. It would be interesting to see more contributions to the topic. Below is my one cent. I have just extended the function that I have ...


10

Go to Format -> Edit Stylesheet Under "Choose a style" choose "Output" Select the cell bracket of the new cell that appears Press Ctrl+Shift+E (Command+Shift+E on a Mac) to show the cell expression Change Cell[StyleData["Output"]] to Cell[StyleData["Output"], ShowCellLabel -> False] Press Ctrl+Shift+E again Close the stylesheet window


10

I started on this, after building out a search paclet for this answer. The basic idea is to simply provide nicer access to the basic underlying paclet. The code all lives here. We can use it like so: Get["https://raw.githubusercontent.com/b3m2a1/mathematica-tools/master/SearchBrowser.wl"]; SearchBrowser[] And then just type and search: One convenient ...


9

This is perhaps not a completely satisfactory solution but it is Mathematica based. Unlike MessageDialog[] SystemDialogInput["FileSave"] will make the Taskbar icon flash in Windows and the Dock icon bounce in Mac OS X under certain conditions. (I believe the document must be minimised in Windows or hidden in Mac.) Of course it has the slight side-effect ...


9

For those who will encounter the same problem as mine (and OP's), I added this answer. Mathematica now(since 10.0.0) has a new built-in function called RunProcess which does exactly what OP asked (including the standard error).


9

The expression that generates that GUI element is contained in the file: FileNameJoin[ {$InstallationDirectory, "SystemFiles", "FrontEnd", "TextResources", "ColorSchemeSelector.tr"}] After making a back-up you can edit that file as you see fit. I don't have time to dig into it now and make a nice improvement but I confirmed that editing works by ...


9

Quick fix for a specific file: Ok, let's open new package File -> New -> Package. It was second on my list of Notebooks[]. So: package = Notebooks[][[2]] This is a notebook as any other, it just has different stylesheet ("Package.nb") and we can modify it as any other: SetOptions[ package, { StyleDefinitions -> Notebook[{ Cell[StyleData[...


9

The simplest way is just data = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}}; InputField[Dynamic[data]] Dynamic[data] {{1, 2, 3, 4, 55}, {6, 7, 88, 9, 10}}


9

Real-time Reloading of Menus The answer to the first one is very simple. After you make changes to your MenuSetup.tr file simply call FrontEndExecute@{ FrontEnd`FlushTextResourceCaches[], ResetMenusPacket[{Automatic, Automatic}] } This will reload the menus. The first part gets the MenuSetup.tr loaded and the second applies the actual changes. If you ...


9

I do this differently to @MB1965. SetOptions[$FrontEndSession, MenuConfigurationFile -> "path/to/alternative/MenuSetup.tr" ]; and then to restore the menus: SetOptions[$FrontEndSession, MenuConfigurationFile -> Inherited ]; I find this easy and can be done readily on the fly, switched on and off with buttons etc.


9

Here's a stylesheet version that mimics Kuba's code: With[{cv := CurrentValue[EvaluationCell[], {TaggingRules, "LastCursorPosition"}]}, SetOptions[EvaluationNotebook[], StyleDefinitions -> Notebook[ { Cell[StyleData[StyleDefinitions->"Default.nb"]], Cell[StyleData["Input"], ...


8

Writing games using dynamic interactivity in mathematica is an amusing subject! I will vote up your post for this. But I agree with others that it is hard to answer your question, you should work out minimal example for us first. Below I am giving my code for tetris. I recognize, it is a nonminimal answer, but it is working and can be useful for you. ...


8

I don't know whether I interpret your question correctly but have you checked Preferences->Appearance? There you see what the colors of the syntax highlighter mean:


8

There is a setting in the Global Preferences: Notebook Options | Window Properties | WindowTitle | "FullFileName"


8

I'm honestly not entirely satisfied with this answer, but it should get you on the right track: dialogWithTimeLimit[Dynamic[val_Symbol], limit_?NumericQ] := With[{ startTime = AbsoluteTime[] }, CreateDialog[ { Dynamic[ If[AbsoluteTime[] - startTime > limit, DialogReturn[val = "time's up"]]; ...


7

Here is some code I wrote to make a palette that I use a lot. Maybe the it will work you, or at least give you ideas on how to do it. CreatePalette[ Framed @ Column[{ Button["Evaluate Cells", FrontEndExecute[FrontEndToken["EvaluateCells"]], Appearance -> "Palette", ImageSize -> 140], Button["Evaluate Notebook", ...


7

It's just no longer the default. You can turn it back on via CurrentValue[$FrontEnd, "EvaluationQueueActions"] = Append[CurrentValue[$FrontEnd, "EvaluationQueueActions"], "Icon"].


6

Following suggestions in the comments, here is a way to achieve what I want: Manipulate[ Row[{ Plot[Sin[x (1 + a x)], {x, 0, 6}], Plot[Evaluate@D[Sin[x (1 + a x)], x], {x, 0, 6}]}, BaseStyle -> ImageSizeMultipliers -> 2/3], {a, 0, 2, Grid[{{ Slider[##, Appearance -> Tiny], InputField[#, FieldSize -> ...


6

I think you've actually done a good job considering you are only using Manipulate. Here's a simplified snake game using Dynamic: snake = {{0, 0}, {0, 1}, {0, 2}}; dir = {0, -1}; directions = { "UpArrowKeyDown" :> (dir = {0, 1}), "DownArrowKeyDown" :> (dir = {0, -1}), "LeftArrowKeyDown" :> (dir = {-1, 0}), "RightArrowKeyDown" :> (dir ...


6

To open the help page just place the cursor somewhere within the function name and press F1. To get the template list use the following shortcut Ctrl+Shift+k. More keyboard shortcuts can be found here.


6

I also have a USB to RS232 converter connected to my machine (Windows 7 Mathematica 10). I don't have any RS232 device (The RS232 connector is left unconnected). I have done successfully the following test : After connecting the receive and transmit pin together (pin 2 and 3, either valid for 9 pins connector or 25 pins connector), send and receive a ...


6

I have successfully tested your code, it does work. piratebus = DeviceOpen[ "Serial", {"COM8", "BaudRate" -> 115200, "DataBits" -> 8, "Parity" -> None, "StopBits" -> 1}]; Leave some time before this DeviceWrite[piratebus, "?\n"]; FromCharacterCode@DeviceReadBuffer[piratebus]


Only top voted, non community-wiki answers of a minimum length are eligible