Search found 21 matches

by morxy49
17 Apr 2018, 08:24
Forum: Ask for Help (v1)
Topic: Why are my global variables not global?
Replies: 19
Views: 2748

Re: Why are my global variables not global?

swagfag wrote:

Code: Select all

ButtonApply:
saveSettings()
Gui, Submit
return
gui submit after calling the save function

save is called with uninitialized/old data
Awesome! Thanks, i will try to submit before calling save.
by morxy49
17 Apr 2018, 08:23
Forum: Ask for Help (v1)
Topic: Why are my global variables not global?
Replies: 19
Views: 2748

Re: Why are my global variables not global?

So this might be more refactoring than you want to do, but since I've been using it successfully for a while now, here is the script I use for saving and loading user settings. It's nice because it's easy to add new things to be saved (just add them to the appropriate global variable), and it lets ...
by morxy49
16 Apr 2018, 15:22
Forum: Ask for Help (v1)
Topic: Why are my global variables not global?
Replies: 19
Views: 2748

Re: Why are my global variables not global?

However, now i've encountered an even stranger issue... i have to save my settings TWICE in order to write the changes to the .ini file. The first time i save, it updates the variables locally, but doesn't update the .ini file until i save once more. wtf? This is my current code (P.S, now i included...
by morxy49
16 Apr 2018, 14:50
Forum: Ask for Help (v1)
Topic: Why are my global variables not global?
Replies: 19
Views: 2748

Re: Why are my global variables not global?

Ah! i finally made it work!!! first of all, i had to make the variable settingsfile a global variable, which i wasn't able to do in one step, because that threw an error, so i did it like this: global settingsfile settingsfile = %A_MyDocuments%\csc_helper-user_settings.ini then i had to remove all t...
by morxy49
16 Apr 2018, 14:21
Forum: Ask for Help (v1)
Topic: Why are my global variables not global?
Replies: 19
Views: 2748

Re: Why are my global variables not global?

tested with: #SingleInstance, Force SetWorkingDir, %A_ScriptDir% ;initial variables settingsfile := "csc_helper-user_settings.ini" paused := false global FirstName global LastName global TeliaID global PersonalCompanyEmail global PersonalCompanyPhone global CarrierCSCemail global NCMemail global Pr...
by morxy49
16 Apr 2018, 14:18
Forum: Ask for Help (v1)
Topic: Why are my global variables not global?
Replies: 19
Views: 2748

Re: Why are my global variables not global?

MaxAstro wrote:This is odd, but since you are declaring the variables as super-global, you might try removing the unneeded global tag from your functions. No idea if it will make a difference, but it could.
Already tried that. No difference...
by morxy49
16 Apr 2018, 13:16
Forum: Ask for Help (v1)
Topic: Why are my global variables not global?
Replies: 19
Views: 2748

Why are my global variables not global?

I'm having severe issues getting my various functions for user settings to work. I have declared global variables in the beginning of the code, then i have a couple of functions like userSettings, saveSettings, loadSettings, setDefaultSettings etc that should access those global variables. But the c...
by morxy49
10 Apr 2018, 14:10
Forum: Ask for Help (v1)
Topic: How to move a button once it's already placed in GUI?
Replies: 5
Views: 1289

Re: How to move a button once it's already placed in GUI?

Oh, and is there anyone who has any solution to my second problem?
When i add more workers than can fit inside the box, i want the scrollbar to work, but it doesn't. Why is that?
by morxy49
10 Apr 2018, 14:08
Forum: Ask for Help (v1)
Topic: How to move a button once it's already placed in GUI?
Replies: 5
Views: 1289

Re: How to move a button once it's already placed in GUI?

Odlanir wrote:try this

Code: Select all

....
....
ButPos := (110*(pos+1))+10
GuiControl, Move, + Add Worker,x92 y%Butpos% w150 h30
Aha! Thank you very much :)
Why does that work though? I don't really understand.
by morxy49
10 Apr 2018, 12:19
Forum: Ask for Help (v1)
Topic: How to move a button once it's already placed in GUI?
Replies: 5
Views: 1289

Re: How to move a button once it's already placed in GUI?

change to Apos:=70+(pos*110) Bpos:=90+(pos*110) Cpos:=130+(pos*110) Thanks for your input, however, i don't think you quite understood the problem. Your solution will only move down the worker below the add button, while i want to button to always stay below the bottom worker, i.e, it should move d...
by morxy49
10 Apr 2018, 11:42
Forum: Ask for Help (v1)
Topic: How to move a button once it's already placed in GUI?
Replies: 5
Views: 1289

How to move a button once it's already placed in GUI?

Hi, I'm trying to create a dynamic button which adds a "worker" to the GUI (this part works) and then moves down to under the worker (this part doesn't work). I can't get the button to move. How do i do this? At the moment it looks like this when there are no workers: https://i.imgur.com/DHdJxcg.png...
by morxy49
10 Apr 2018, 11:34
Forum: Ask for Help (v1)
Topic: Highlight text in Outlook 2013
Replies: 7
Views: 1472

Re: Highlight text in Outlook 2013

Thank you for your input! Unfortunately i need this to show up in all emails, not only in composing, so i guess i will have to scrap that idea :/
But thank you anyway for your time! It's appreciated!
by morxy49
05 Apr 2018, 04:32
Forum: Ask for Help (v1)
Topic: Highlight text in Outlook 2013
Replies: 7
Views: 1472

Re: Highlight text in Outlook 2013

Does nobody know how to do this? :(
by morxy49
03 Apr 2018, 06:07
Forum: Ask for Help (v1)
Topic: Highlight text in Outlook 2013
Replies: 7
Views: 1472

Highlight text in Outlook 2013

Hi, I'm trying to create a script that highlights all occurrences of a specific type of string inside of an email in Outlook 2013 (both in the body and the subject field if possible). I want to highlight all occurrences of a 8-digit number beginning with either "00" or just "0" (for example "0083792...
by morxy49
27 Mar 2018, 02:57
Forum: Ask for Help (v1)
Topic: Send special characters?
Replies: 1
Views: 362

Send special characters?

Hi,

I'm trying to make a script where for example writing "idunno" would appear as "¯\_(ツ)_/¯", but it appears as "¯\_(ツ)_/¯" instead. How do i fix this?

Code: Select all

::idunno:: 
SendRaw, ¯\_(ツ)_/¯
Return
by morxy49
18 Mar 2018, 08:18
Forum: Ask for Help (v1)
Topic: Using WinExist() with a variable doesn't work? Topic is solved
Replies: 13
Views: 2077

Re: Using WinExist() with a variable doesn't work? Topic is solved

No, that doesn't work. That's not the problem - the problem is that the If-statement doesn't work in the first place, so it always defaults back to the else-statement.
by morxy49
18 Mar 2018, 07:39
Forum: Ask for Help (v1)
Topic: Using WinExist() with a variable doesn't work? Topic is solved
Replies: 13
Views: 2077

Re: Using WinExist() with a variable doesn't work? Topic is solved

I have yet another one that doesn't work... I don't know why because I'm doing it the exact same way. I want to use PgUp to increase the Spotify volume if spotify window is active, otherwise it should increase system volume. But this script always increases system volume no matter what. MediaPlayerP...
by morxy49
12 Mar 2018, 07:21
Forum: Ask for Help (v1)
Topic: Using WinExist() with a variable doesn't work? Topic is solved
Replies: 13
Views: 2077

Re: Using WinExist() with a variable doesn't work? Topic is solved

BoBo wrote:If WinExist("ahk_exe " . PrimaryBrowserProcess)
Yes! Thank you!!
by morxy49
12 Mar 2018, 07:10
Forum: Ask for Help (v1)
Topic: Using WinExist() with a variable doesn't work? Topic is solved
Replies: 13
Views: 2077

Using WinExist() with a variable doesn't work? Topic is solved

I have the following code, which according to me should work, but it doesn't. PrimaryBrowserProcess := "firefox.exe" F3:: if WinExist(ahk_exe PrimaryBrowserProcess){ Send, ^c WinActivate Send, r Send, ^a Send, ^v Send, {enter} } else { MsgBox, ( Oops! Seems like you don't have any browser open right...
by morxy49
05 Aug 2016, 03:12
Forum: Ask for Help (v1)
Topic: Pasting from clipboard in a hotstring Topic is solved
Replies: 2
Views: 1981

Re: Pasting from clipboard in a hotstring Topic is solved

Blackholyman wrote:

Code: Select all

:C:open_::
sendinput, We have opened case number %clipboard% for this, and will soon get back to you with more information about the case.
return
Thank you! Works perfectly.

Go to advanced search